/* ==========================================================================
   AzTyping - Layout, Header Navbar, Quick Stats Pills & Footer
   ========================================================================== */


.notebook-wrapper { max-width: 1360px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; min-height: calc(100vh - 32px); }

/* Header Navbar */
.main-header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 8px 16px; 
    background: var(--card-bg); 
    border: 2px solid var(--card-border); 
    border-radius: 18px; 
    box-shadow: 3px 3px 0 rgba(110, 68, 255, 0.1), 0 4px 16px rgba(0,0,0,0.06); 
    animation: headerDrop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; 
    gap: 8px;
    position: sticky;
    top: 16px;
    z-index: 1000;
}
@keyframes headerDrop { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
.logo-area { display: flex; align-items: center; gap: 8px; cursor: pointer; flex-shrink: 0; }
.logo-avatar .mascot-img { 
    width: 34px; 
    height: 34px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 2px solid var(--primary-purple);
}
.brand-title { font-family: 'Outfit', sans-serif; font-size: 1.3rem; font-weight: 800; line-height: 1; color: var(--text-main); }
.crown-doodle { font-size: 0.95rem; margin-right: 2px; display: inline-block; transform: rotate(-12deg); }
.brand-subtitle { display: none; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(110, 68, 255, 0.05);
    padding: 3px;
    border-radius: 14px;
    border: 1.5px solid rgba(110, 68, 255, 0.1);
    overflow: visible;
}
.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted, #64748B);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 10px;
    transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    position: relative;
}
.sketch-underline { display: none !important; }
.nav-item:hover {
    background: rgba(110, 68, 255, 0.12);
    color: var(--primary-purple, #6E44FF);
    transform: translateY(-1px);
}
.nav-item.active {
    background: linear-gradient(135deg, #6E44FF, #5B21B6);
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(110, 68, 255, 0.4);
    transform: translateY(-1px);
}
.nav-item.active svg { stroke: #ffffff; }

/* Dynamic Ergonomic Tooltips for Header Nav */
.nav-item[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #0F172A;
    color: #F8FAFC;
    font-size: 0.73rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    padding: 5px 10px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1050;
}

.nav-item[data-tooltip]::after {
    content: '';
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #0F172A transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1051;
}

.nav-item[data-tooltip]:hover::before,
.nav-item[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Sound Quick Toggle Button */
.sound-quick-toggle-btn {
    background: rgba(110, 68, 255, 0.08);
    border: 1.5px solid rgba(110, 68, 255, 0.2);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.sound-quick-toggle-btn:hover {
    background: rgba(110, 68, 255, 0.18);
    transform: scale(1.08);
    border-color: var(--primary-purple);
}

.badge-pro {
    background: #F59E0B;
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 6px;
    margin-left: 2px;
}
.nav-item.active .badge-pro {
    background: #ffffff;
    color: #D97706;
}

.user-widgets { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Clean Pill Widgets for XP, Level, Streak */
.nav-pill-widget {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    white-space: nowrap;
}

/* XP Pill */
.pill-xp {
    background: rgba(139, 92, 246, 0.1);
    border: 1.5px solid rgba(139, 92, 246, 0.3);
    color: #7C3AED;
}

.pill-xp:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8B5CF6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

/* Level Pill */
.pill-level {
    background: rgba(99, 102, 241, 0.1);
    border: 1.5px solid rgba(99, 102, 241, 0.3);
    color: #4F46E5;
}

.pill-level:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366F1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

/* Streak Pill */
.pill-streak {
    background: rgba(249, 115, 22, 0.1);
    border: 1.5px solid rgba(249, 115, 22, 0.3);
    color: #EA580C;
}

.pill-streak:hover {
    background: rgba(249, 115, 22, 0.2);
    border-color: #F97316;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.pill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-header-btn { display: flex; align-items: center; gap: 3px; cursor: pointer; transition: transform 0.15s ease; }
.profile-header-btn:hover { transform: scale(1.05); }
.header-avatar { width: 34px; height: 34px; border-radius: 50%; border: 1.8px solid var(--primary-purple); box-shadow: 0 2px 6px rgba(110,68,255,0.25); }

/* Main Layout */
.app-body { display: block; width: 100%; }
.views-wrapper { width: 100%; }
.badge-pro { background: #F59E0B; color: #fff; font-size: 0.68rem; font-weight: 800; padding: 2px 6px; border-radius: 10px; margin-left: 4px; vertical-align: middle; }
.sidebar-nav { display: none; }
.menu-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.menu-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: transparent; border: none; border-radius: 16px; cursor: pointer; font-size: 1.15rem; color: var(--text-muted); text-align: left; transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); position: relative; overflow: hidden; }
.menu-item.active .menu-btn { background: linear-gradient(135deg, #EDE9FE, #DDD6FE); color: #5B21B6; font-weight: 700; box-shadow: 0 4px 12px rgba(110, 68, 255, 0.18); transform: translateX(4px); }
.menu-btn:hover { background: rgba(110, 68, 255, 0.08); color: var(--primary-purple); transform: translateX(3px); }
.menu-btn:active { transform: translateX(2px) scale(0.97); }
.menu-icon { display: inline-block; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.menu-btn:hover .menu-icon { transform: scale(1.25) rotate(-6deg); }

.app-view {
    display: none;
    width: 100%;
}
.app-view.active-view {
    display: block !important;
}

.paper-card { 
    background: var(--card-bg); 
    border: 1.5px solid var(--card-border); 
    border-radius: 18px; 
    padding: 22px; 
    box-shadow: 3px 3px 0 rgba(110, 68, 255, 0.08), 0 6px 20px rgba(0,0,0,0.05); 
    position: relative; 
    transition: box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.25s ease; 
}
.paper-card:hover {
    box-shadow: 4px 4px 0 rgba(110, 68, 255, 0.2), 0 10px 28px rgba(0,0,0,0.08);
    border-color: rgba(110, 68, 255, 0.25);
    transform: translateY(-2px);
}

.sticky-note { background: var(--sticky-yellow); border-radius: 14px; padding: 18px; box-shadow: 0 8px 20px rgba(0,0,0,0.07); transform: rotate(-1.5deg); position: relative; color: #713F12; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease; }
.sticky-note:hover { transform: rotate(0deg) scale(1.03); box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.sticky-pin { position: absolute; top: -12px; left: 45%; font-size: 1.3rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); }
.progress-bar-wrap { width: 100%; height: 9px; background: rgba(0,0,0,0.07); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 10px; transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); position: relative; overflow: hidden; }
.progress-fill::after { content: ''; position: absolute; top: 0; left: -60%; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent); animation: shimmer 2.2s ease-in-out infinite; }
@keyframes shimmer { from { left: -60%; } to { left: 120%; } }
.green-fill { background: linear-gradient(90deg, #22C55E, #16A34A); }
.purple-fill { background: linear-gradient(90deg, #6E44FF, #8B5CF6); }
.orange-fill { background: linear-gradient(90deg, #F97316, #EA580C); }
.blue-fill { background: linear-gradient(90deg, #3B82F6, #2563EB); }
.yellow-fill { background: linear-gradient(90deg, #F59E0B, #D97706); }

.views-wrapper { width: 100%; }

/* Dashboard Layout */
.dashboard-grid-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.main-content { display: flex; flex-direction: column; gap: 20px; }
.hero-card.notebook-page { 
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 24px; 
    padding: 32px 32px 32px 56px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    position: relative; 
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    overflow: hidden;
}
.hero-card.notebook-page > * {
    z-index: 1;
    position: relative;
}
.spiral-edge, .paper-clip { display: none !important; }
.hero-title { font-size: 2.5rem; font-weight: 700; line-height: 1.18; }
.highlight-purple { color: var(--primary-purple); }
.hero-subtitle { font-size: 1.25rem; color: var(--text-muted); margin: 10px 0 22px; }
.purple-underline { border-bottom: 3px solid var(--primary-purple); color: var(--primary-purple); font-weight: 700; }
.hero-actions { display: flex; gap: 14px; }
.btn { font-size: 1.15rem; font-weight: 700; padding: 12px 26px; border-radius: 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border: 2px solid transparent; transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); position: relative; overflow: hidden; }
.btn::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%); opacity: 0; transition: opacity 0.3s ease; border-radius: inherit; }
.btn:active::after { opacity: 1; }
.btn-primary { background: linear-gradient(135deg, #6E44FF, #5B21B6); color: #FFF; box-shadow: 0 6px 18px rgba(110,68,255,0.38); }
.btn-primary:hover { background: linear-gradient(135deg, #5B21B6, #4C1D95); transform: translateY(-4px) scale(1.025); box-shadow: 0 10px 24px rgba(110,68,255,0.48); }
.btn-primary:active { transform: translateY(-1px) scale(0.98); box-shadow: 0 3px 10px rgba(110,68,255,0.3); }
.btn-secondary { background: var(--card-bg); border: 2px dashed #64748B; color: var(--text-main); }
.btn-secondary:hover { border-style: solid; border-color: var(--primary-purple); color: var(--primary-purple); transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.btn-secondary:active { transform: scale(0.97); }
.hero-illustration { position: relative; width: 220px; height: 180px; }
.warrior-img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.12)); }

.modes-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.mode-card { 
    background: var(--card-bg); 
    border: 1.5px solid rgba(110,68,255,0.1); 
    border-radius: 18px; 
    padding: 18px 14px; 
    cursor: pointer; 
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.28s ease; 
    position: relative;
    overflow: hidden;
}
.mode-card:hover { 
    transform: translateY(-7px) scale(1.02); 
    box-shadow: 0 14px 32px rgba(110,68,255,0.15); 
    border-color: rgba(110,68,255,0.3); 
}
.mode-card:active { transform: translateY(-2px) scale(0.98); }
.mode-emoji { display: inline-block; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.mode-card:hover .mode-emoji { transform: scale(1.35) rotate(12deg); }
.mode-accent-bar { height: 5px; border-radius: 10px; margin-top: 14px; }
.bar-green { background: #22C55E; } .bar-blue { background: #3B82F6; } .bar-yellow { background: #EAB308; } .bar-pink { background: #EC4899; } .bar-purple { background: #8B5CF6; }
.dashboard-row-2 { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; }
.activity-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.activity-item { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-green { background: #22C55E; } .dot-yellow { background: #EAB308; } .dot-blue { background: #3B82F6; }
.right-widgets { display: flex; flex-direction: column; gap: 16px; }
.profile-card { display: flex; flex-direction: column; gap: 12px; }
.profile-avatar { width: 48px; height: 48px; border-radius: 50%; }
.stats-metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; background: rgba(0,0,0,0.03); padding: 10px; border-radius: 14px; }
