/* 苦手清單頁面樣式 */

/* ========================================
   標題區（極簡留白）
   ======================================== */

.notebook-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid #e7e5e4;
    background: transparent;
}

.notebook-header .notebook-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.notebook-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #44403c;
    margin-bottom: 0.25rem;
}

.notebook-header p {
    font-size: 0.9rem;
    color: #78716c;
}

/* ========================================
   登入提示
   ======================================== */

.notebook-login-prompt {
    padding: 3rem;
    text-align: center;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px dashed #dc2626;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.notebook-login-prompt h2 {
    color: #991b1b;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.notebook-login-prompt p {
    color: #7f1d1d;
    margin-bottom: 1.5rem;
}

/* ========================================
   統計卡片
   ======================================== */

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

.notebook-stats .stat-card {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.notebook-stats .stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.notebook-stats .stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* ========================================
   操作按鈕區
   ======================================== */

.notebook-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.notebook-actions .btn-primary {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notebook-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.notebook-actions .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   苦手清單（日系筆記本風格）
   ======================================== */

.notebook-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

/* 卡片容器 */
.notebook-card-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 翻牌卡片 */
.notebook-list .notebook-card {
    width: 96px;
    height: 128px;
    perspective: 1000px;
    background: #F9F6F2 !important;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    padding: 0;
}

.notebook-list .notebook-card .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
    background: #F9F6F2 !important;
    border-radius: 0.75rem;
}

.notebook-list .notebook-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.notebook-list .notebook-card .card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ========================================
   苦手狀態（櫻花粉紙張）
   ======================================== */

.notebook-list .notebook-card .card-front {
    background: #fff5f5 !important;
    border: 2px solid #fecdd3 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.notebook-list .notebook-card .card-back {
    background: #fff5f5 !important;
    border: 2px solid #fecdd3 !important;
    transform: rotateY(180deg);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

.notebook-list .notebook-card .card-kana {
    font-size: 2.5rem;
    font-weight: 700;
    color: #881337;
}

.notebook-list .notebook-card .card-back .card-kana {
    font-size: 1.8rem;
    color: #e11d48;
}

.notebook-list .notebook-card .card-romaji {
    font-size: 1rem;
    color: #f43f5e;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ========================================
   移除按鈕（極簡 Ghost）
   ======================================== */

.notebook-remove-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: transparent;
    color: #d4d4d8;
    border: none;
    padding: 0.25rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    border-radius: 4px;
}

.notebook-card-wrapper:hover .notebook-remove-btn {
    opacity: 1;
}

.notebook-remove-btn:hover {
    color: #ef4444;
    transform: scale(1.15);
}

/* ========================================
   舊版樣式（保留相容性，但隱藏）
   ======================================== */

.notebook-collect-btn,
.btn-collect-all {
    display: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.4);
}

.btn-collect-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(234, 179, 8, 0.5);
}

/* ========================================
   飛行動畫（放入圖鑑）
   ======================================== */

@keyframes flyToZukan {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    50% {
        transform: scale(0.6) translateY(-100px);
        opacity: 0.8;
    }
    100% {
        transform: scale(0.2) translateY(-200px) translateX(100px);
        opacity: 0;
    }
}

.notebook-card-wrapper.collecting {
    animation: flyToZukan 0.6s ease-in forwards;
    pointer-events: none;
}

/* ========================================
   Hover 效果
   ======================================== */

.notebook-list .notebook-card:hover .card-inner {
    transform: scale(1.03);
}

.notebook-list .notebook-card.flipped:hover .card-inner {
    transform: rotateY(180deg) scale(1.03);
}

/* ========================================
   空狀態
   ======================================== */

.notebook-empty {
    text-align: center;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 1rem;
}

.notebook-empty .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.notebook-empty p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.notebook-empty .btn-secondary {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent-primary);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.notebook-empty .btn-secondary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* ========================================
   載入狀態
   ======================================== */

.loading-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

/* ========================================
   響應式
   ======================================== */

@media (max-width: 768px) {
    .notebook-header {
        padding: 1.5rem;
    }
    
    .notebook-header h1 {
        font-size: 1.5rem;
    }
    
    .notebook-stats {
        grid-template-columns: 1fr;
    }
    
    .notebook-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .notebook-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .notebook-item .kana {
        font-size: 2rem;
    }
}
