/* AI 練習頁面專屬樣式 */

/* ========================================
   AI 頁面標題區
   ======================================== */

.ai-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-radius: 1rem;
    border: 2px solid #f59e0b;
}

.ai-header .ai-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.ai-header h1 {
    font-size: 2.2rem;
    color: #78350f;
    margin-bottom: 0.5rem;
}

.ai-header p {
    font-size: 1.1rem;
    color: #92400e;
}

/* ========================================
   狀態卡片
   ======================================== */

/* 狀態卡片容器 */
.ai-status-card {
    background: transparent;
    border-radius: 1rem;
    padding: 0;
    box-shadow: none;
}

/* 第一個狀態卡片預設顯示，第二個預設隱藏 */
#ai-guest-msg {
    display: block;
}

#ai-member-content {
    display: none;
}

/* ========================================
   未登入狀態
   ======================================== */

.ai-locked.guest {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px dashed #dc2626;
    border-radius: 1rem;
    padding: 1rem;
}

.ai-locked.guest h2 {
    color: #991b1b;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.ai-locked.guest p {
    color: #7f1d1d;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.btn-login {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* ========================================
   未解鎖狀態
   ======================================== */

.ai-locked.progress {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 1rem;
    padding: 1rem;
}

.ai-locked.progress h2 {
    color: #374151;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.unlock-progress {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #374151;
}

.unlock-progress strong {
    color: #f59e0b;
    font-size: 2rem;
    display: block;
    margin-top: 0.5rem;
}

.ai-progress-bar {
    width: 100%;
    max-width: 500px;
    height: 20px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 1.5rem auto;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.ai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 50%, #f59e0b 100%);
    background-size: 200% 100%;
    transition: width 0.5s ease;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ai-locked.progress .motivation {
    margin-top: 1.5rem;
    font-size: 1.05rem;
    color: #6b7280;
}

.btn-practice {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(180deg, #8B0000 0%, #6B0000 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-practice:hover {
    background: linear-gradient(180deg, #6B0000 0%, #4B0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4);
}

/* ========================================
   已解鎖狀態
   ======================================== */

/* 已解鎖狀態 - 與其他練習頁面統一風格 */
.ai-unlocked {
    text-align: center;
}

.ai-unlocked h2 {
    color: #1c1917;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .ai-unlocked h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

.ai-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .ai-stats {
        gap: 1rem;
        margin-bottom: 2rem;
    }
}

.ai-stat-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(139, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .ai-stat-card {
        padding: 1rem;
    }
}

.ai-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .ai-stat-label {
        font-size: 0.85rem;
    }
}

.ai-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
}

@media (min-width: 768px) {
    .ai-stat-value {
        font-size: 2rem;
    }
}

/* 不同卡片的數值顏色 */
.ai-stat-card:nth-child(1) .ai-stat-value {
    color: #b91c1c; /* 弱點 - 紅色 */
}
.ai-stat-card:nth-child(2) .ai-stat-value {
    color: #d97706; /* 苦手 - 橙色 */
}
.ai-stat-card:nth-child(3) .ai-stat-value {
    color: #b45309; /* 掌握 - 琥珀色 */
}

.ai-start-section {
    text-align: center;
    margin-top: 1rem;
}

.ai-hint {
    color: #78350f;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(251, 191, 36, 0.15);
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
}

.ai-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.3rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.ai-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   響應式設計
   ======================================== */

@media (max-width: 768px) {
    .ai-header {
        padding: 1.5rem;
    }
    
    .ai-header h1 {
        font-size: 1.8rem;
    }
    
    .ai-status-card {
        padding: 1.5rem;
    }
    
    .ai-locked.guest,
    .ai-locked.progress,
    .ai-unlocked {
        padding: 2rem;
    }
    
    .ai-stats {
        grid-template-columns: 1fr;
    }
    
    .ai-btn {
        padding: 0.875rem 2rem;
        font-size: 1.1rem;
    }
}
