:root {
    --primary: #3cb043;
    --primary-dark: #2d8a35;
    --primary-light: #5dd466;
    --secondary: #8bc34a;
    --danger: #dc3545;
    --warning: #d4a017;
    --dark: #0c0c0c;
    --darker: #060606;
    --medium: #161616;
    --light: #e8e8e8;
    --light-secondary: #a0a0a0;
    --gray: #5a5a5a;
    --border: rgba(60, 176, 67, 0.12);
    --border-solid: #1e1e1e;
    --glow: rgba(60, 176, 67, 0.35);
    --glass: rgba(12, 12, 12, 0.85);
    --glass-border: rgba(60, 176, 67, 0.08);
    --radius: 6px;
    --radius-lg: 8px;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

[data-theme="light"] {
    --dark: #f2f2f2;
    --darker: #e8e8e8;
    --medium: #d8d8d8;
    --light: #1a1a1a;
    --light-secondary: #444;
    --gray: #777;
    --border: rgba(60, 176, 67, 0.1);
    --border-solid: #ccc;
    --glow: rgba(60, 176, 67, 0.2);
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.06);
}

[data-theme="sakura"] {
    --primary: #e8729a;
    --primary-dark: #c7567e;
    --primary-light: #f4a0bb;
    --secondary: #f4a0bb;
    --dark: #fff5f8;
    --darker: #ffecf1;
    --medium: #fde2ea;
    --light: #3a2a30;
    --light-secondary: #6e525a;
    --gray: #a88892;
    --border: rgba(232, 114, 154, 0.12);
    --border-solid: #f0c9d5;
    --glow: rgba(232, 114, 154, 0.25);
    --glass: rgba(255, 245, 248, 0.9);
    --glass-border: rgba(232, 114, 154, 0.08);
}

[data-theme="phantom"] {
    --primary: #a855f7;
    --primary-dark: #8b35e0;
    --primary-light: #c084fc;
    --secondary: #c084fc;
    --dark: #0c0a10;
    --darker: #060408;
    --medium: #14101c;
    --light: #e8e4f0;
    --light-secondary: #a09ab0;
    --gray: #5a5468;
    --border: rgba(168, 85, 247, 0.12);
    --border-solid: #1e1a28;
    --glow: rgba(168, 85, 247, 0.35);
    --glass: rgba(12, 10, 16, 0.85);
    --glass-border: rgba(168, 85, 247, 0.08);
}

[data-theme="slate"] {
    --primary: #94a3b8;
    --primary-dark: #64748b;
    --primary-light: #cbd5e1;
    --secondary: #94a3b8;
    --dark: #0f1117;
    --darker: #0a0b0f;
    --medium: #161922;
    --light: #e2e4ea;
    --light-secondary: #8b8fa0;
    --gray: #4e5260;
    --border: rgba(148, 163, 184, 0.1);
    --border-solid: #1e2030;
    --glow: rgba(148, 163, 184, 0.15);
    --glass: rgba(15, 17, 23, 0.85);
    --glass-border: rgba(148, 163, 184, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--darker);
    color: var(--light);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Honeycomb background for webapp pages (not login/signup) */
body:not(.login-page)::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 0 0, transparent 8px, var(--border) 8px, var(--border) 10px, transparent 11px),
        radial-gradient(circle at 100% 0, transparent 8px, var(--border) 8px, var(--border) 10px, transparent 11px),
        radial-gradient(circle at 100% 100%, transparent 8px, var(--border) 8px, var(--border) 10px, transparent 11px),
        radial-gradient(circle at 0 100%, transparent 8px, var(--border) 8px, var(--border) 10px, transparent 11px);
    background-size: 40px 70px;
    background-position: 0 0, 20px 0, 20px 35px, 0 35px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* Subtle vignette overlay — draws eye to center content */
body:not(.login-page)::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--darker) 100%);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

/* ========== App Navbar ========== */
.app-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 6, 6, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-solid);
    padding: 0 16px;
}

.app-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
}

.app-nav-brand {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 12px var(--glow);
}

.app-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.app-nav-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.app-nav-links a:hover {
    color: var(--light);
    background: var(--glass-border);
}

.app-nav-links a.active {
    color: var(--primary-light);
    background: var(--border);
    box-shadow: inset 0 -2px 0 var(--primary);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
    border-radius: var(--radius);
    transition: background 0.15s ease;
}

.nav-hamburger:hover {
    background: var(--glass-border);
}

.nav-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--gray);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.nav-hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--primary);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--primary);
}

.app-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Theme Toggle - Sun Icon */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius);
    transition: background 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
}

.theme-toggle:hover {
    background: var(--border);
    color: var(--primary-light);
}

.theme-toggle .sun-icon {
    width: 20px;
    height: 20px;
    display: block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Theme Picker Popup */
.theme-picker {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: auto;
    margin-top: 0;
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
    min-width: 170px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

@media (min-width: 769px) {
    .theme-picker {
        position: absolute;
        top: 100%;
        right: 0;
        bottom: auto;
        margin-top: 6px;
    }
}

.theme-picker.open {
    display: flex;
}

.theme-picker-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--light-secondary);
    text-align: left;
    width: 100%;
}

.theme-picker-option:hover {
    background: var(--medium);
    color: var(--light);
}

.theme-picker-option.active {
    border-color: var(--primary);
    color: var(--light);
}

.theme-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-solid);
    flex-shrink: 0;
}

.theme-swatch-default { background: #3cb043; }
.theme-swatch-sakura { background: linear-gradient(135deg, #e8729a, #f4a0bb); }
.theme-swatch-phantom { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.theme-swatch-slate { background: linear-gradient(135deg, #94a3b8, #64748b); }

.theme-toggle-float {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
}

/* ========== LOGIN PAGE - Parallax Background ========== */
.login-page {
    background: transparent;
}

.parallax-bg {
    position: fixed;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    z-index: 0;
}

.parallax-img {
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    background-image: url('/images/bg.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    transform: scale(1.1);
    transition: transform 0.3s ease-out;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(10, 15, 8, 0.4) 0%,
        rgba(10, 15, 8, 0.7) 60%,
        rgba(10, 15, 8, 0.85) 100%
    );
}

.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    position: relative;
    z-index: 1;
}

/* ========== Signup Card - Glassmorphism ========== */
.signup-card {
    width: 100%;
    max-width: 480px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.logo {
    text-align: center;
    margin-bottom: 8px;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--light);
    letter-spacing: -0.5px;
}

.logo .subtitle {
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: 4px;
    letter-spacing: 0.3px;
}

.accent-line {
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    margin: 20px auto 28px;
}

/* ========== Form Styles ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--light-secondary);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.2px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    background: rgba(10, 15, 8, 0.6);
    color: var(--light);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.25s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--glow);
    background: rgba(10, 15, 8, 0.8);
}

.form-group input::placeholder {
    color: var(--gray);
    font-weight: 300;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 60px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--primary-light);
}

.eye-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-top: -5px;
    margin-bottom: 5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.confidence-slider {
    display: flex;
    align-items: center;
    gap: 12px;
}

.confidence-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: var(--border-solid);
    border-radius: 0;
    cursor: pointer;
    outline: none;
    position: relative;
}

.confidence-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background: var(--primary);
    border: 2px solid var(--primary-light);
    cursor: pointer;
    box-shadow: 0 0 8px var(--glow);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.confidence-slider input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 14px var(--glow);
    transform: scale(1.15);
}

.confidence-slider input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background: var(--primary);
    border: 2px solid var(--primary-light);
    cursor: pointer;
    box-shadow: 0 0 8px var(--glow);
}

.confidence-slider input[type="range"]::-moz-range-track {
    height: 4px;
    background: var(--border-solid);
    border: none;
    border-radius: 0;
}

.confidence-slider span {
    font-weight: 700;
    color: var(--primary-light);
    min-width: 42px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    text-shadow: 0 0 6px var(--glow);
}

/* ========== Buttons ========== */
.btn-primary {
    width: 100%;
    padding: 11px;
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: 0 0 16px var(--glow);
}

.btn-primary:active {
    box-shadow: none;
}

.btn-secondary {
    padding: 7px 14px;
    background: transparent;
    color: var(--light-secondary);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

.btn-danger {
    padding: 7px 14px;
    background: transparent;
    color: #f87171;
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    box-shadow: 0 0 12px rgba(220, 53, 69, 0.3);
}

.login-link {
    text-align: center;
    margin-top: 24px;
    color: var(--gray);
    font-size: 0.82rem;
}

.login-link a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.login-link a:hover {
    color: var(--secondary);
}

/* ========== Dashboard Styles ========== */
.dashboard-header {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    margin-bottom: 28px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--light);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info span,
.profile-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.profile-link:hover {
    color: var(--secondary);
}

.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.card {
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

.card h2 {
    margin-bottom: 16px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.card h2 svg {
    opacity: 0.6;
}

/* ========== Add Subject Form (New Dungeon) ========== */
.card-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-header-sub {
    font-size: 0.62rem;
    font-family: var(--font-mono);
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.subject-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subject-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.subject-field-label {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.field-hint {
    color: var(--primary-light);
    font-weight: 700;
}

.subject-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    background: var(--medium);
    color: var(--light);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    transition: all 0.2s ease;
}

.subject-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--glow);
    background: var(--darker);
}

.subject-input::placeholder {
    color: var(--gray);
    font-weight: 300;
}

/* Difficulty segmented picker */
.diff-picker {
    display: flex;
    gap: 6px;
}

.diff-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 4px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--gray);
    font-family: inherit;
}

.diff-btn:hover {
    border-color: var(--primary);
    color: var(--light);
}

.diff-btn-active {
    border-color: var(--primary);
    background: var(--glass-border);
    color: var(--primary-light);
    box-shadow: 0 0 10px var(--glow);
}

.diff-pips {
    display: flex;
    gap: 3px;
}

.diff-pips span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.4;
}

.diff-btn-active .diff-pips span {
    opacity: 1;
    background: var(--primary);
}

.diff-name {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Confidence slider override for subject form */
.subject-field .confidence-slider {
    margin-top: 2px;
}

/* Submit button */
.subject-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.subject-submit-btn:hover {
    background: var(--primary);
    color: var(--dark);
    box-shadow: 0 0 18px var(--glow);
}

.subjects-list {
    max-height: 400px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    color: var(--gray);
    padding: 32px 16px;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

.subject-item {
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 8px;
    transition: all 0.15s ease;
}

.subject-item:hover {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--glass-border);
}

.subject-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.subject-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--light);
}

.subject-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--light-secondary);
    font-family: var(--font-mono);
}

.difficulty-badge {
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-1 { background: rgba(34, 197, 94, 0.12); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.2); }
.difficulty-2 { background: rgba(59, 130, 246, 0.12); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.difficulty-3 { background: rgba(234, 179, 8, 0.12); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.2); }
.difficulty-4 { background: rgba(249, 115, 22, 0.12); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.2); }
.difficulty-5 { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }

.confidence-bar {
    height: 3px;
    background: var(--border-solid);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 10px;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 0;
    transition: width 0.3s ease;
    box-shadow: 0 0 6px var(--glow);
}

.subject-actions {
    display: flex;
    gap: 6px;
}

.subject-actions button {
    flex: 1;
    padding: 8px;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.start-raid {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

.start-raid:hover {
    background: var(--primary-light);
    box-shadow: 0 0 12px var(--glow);
}

.start-raid-locked {
    background: transparent;
    color: var(--gray);
    border: 1px solid var(--gray);
    cursor: pointer;
    opacity: 0.7;
}

.start-raid-locked:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: none;
    background: transparent;
    opacity: 1;
}

.subject-active-raid {
    border-color: var(--primary) !important;
    box-shadow: 0 0 8px var(--glow);
}

.delete-subject {
    background: transparent;
    color: #f87171;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.delete-subject:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.active-session-card {
    grid-column: 1 / -1;
}

#activeSessionInfo {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--light-secondary);
}

/* Daily Quests card — full width */
.daily-quests-card {
    grid-column: 1 / -1;
}

/* Recent Raids card */
.recent-raids-card .section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.recent-raids-card .section-header-row h2 {
    margin-bottom: 0;
}

.view-all-link {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.15s ease;
}

.view-all-link:hover {
    color: var(--primary-light);
    text-shadow: 0 0 8px var(--glow);
}

/* ---- Quest Items ---- */
.daily-quests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quest-progress-bar {
    height: 3px;
    background: var(--border-solid);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 4px;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.4s ease;
    box-shadow: 0 0 6px var(--glow);
}

.quest-progress-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-family: var(--font-mono);
}

.quest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    transition: all 0.15s ease;
}

.quest-item:hover {
    border-color: var(--primary);
}

.quest-item.quest-completed {
    opacity: 0.5;
    border-color: var(--border-solid);
}

.quest-item.quest-completed .quest-desc {
    text-decoration: line-through;
}

.quest-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quest-icon-review {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.quest-icon-practice {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.2);
    color: #facc15;
}

.quest-icon-challenge {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.quest-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quest-desc {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--light);
}

.quest-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quest-subject {
    font-size: 0.68rem;
    color: var(--gray);
    font-weight: 500;
}

.quest-xp {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary-light);
    font-family: var(--font-mono);
}

.quest-action {
    flex-shrink: 0;
}

.quest-complete-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.quest-complete-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 10px var(--glow);
}

.quest-done-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-mono);
}

.quest-ready {
    background: var(--primary);
    color: white;
    animation: questPulse 1.5s ease-in-out infinite;
}

@keyframes questPulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--glow); }
    50% { box-shadow: 0 0 12px 2px var(--glow); }
}

.quest-ready-glow {
    border-color: var(--primary);
    background: var(--glass-border);
}

.quest-progress-mini {
    font-size: 0.58rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--gray);
}

.quest-mini-bar {
    width: 100%;
    height: 3px;
    background: var(--border-solid);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.quest-mini-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ---- Recent Raids Mini Entries ---- */
.recent-raids-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.raid-mini-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    transition: border-color 0.15s ease;
}

.raid-mini-entry:hover {
    border-color: var(--primary);
}

.raid-mini-entry.raid-mini-abandoned {
    opacity: 0.6;
    border-left: 2px solid var(--warning);
}

.raid-mini-subject {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--light);
}

.raid-mini-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.raid-mini-date {
    font-size: 0.68rem;
    color: var(--gray);
}

.raid-mini-duration {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-light);
    font-family: var(--font-mono);
}

/* ========== Friends Page ========== */
.friends-page {
    max-width: 640px;
    margin: 24px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

/* Search card */
.friends-search-card {
    position: relative;
}

.friends-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    padding: 10px 14px;
    transition: all 0.15s ease;
}

.friends-search-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--glass-border);
}

.friends-search-icon {
    color: var(--gray);
    flex-shrink: 0;
}

.friends-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--light);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
}

.friends-search-input::placeholder {
    color: var(--gray);
}

.friends-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--darker);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    padding: 6px;
    z-index: 20;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.friend-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.15s ease;
}

.friend-search-item:hover {
    background: var(--dark);
}

.friend-search-item .friend-name {
    flex: 1;
}

/* Tabs */
.friends-tabs {
    display: flex;
    gap: 0;
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    padding: 3px;
}

.friends-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--gray);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.friends-tab:hover {
    color: var(--light-secondary);
}

.friends-tab.active {
    background: var(--primary);
    color: white;
}

.friends-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.7rem;
    font-weight: 600;
}

.friends-tab.active .friends-tab-count {
    background: var(--primary);
    color: white;
}

/* Section label */
.friends-section-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    padding: 0 4px 8px;
}

/* Friend cards */
.friends-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.friend-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    transition: all 0.15s ease;
}

.friend-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 6px var(--glass-border);
}

.friend-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    border: 1px solid var(--primary);
}

.friend-avatar-blocked {
    background: var(--gray);
    border-color: var(--gray);
}

.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 1px;
}

.friend-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.friend-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    background: transparent;
    color: var(--light-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.friend-action-btn:hover {
    background: var(--dark);
}

.friend-add-btn {
    border-color: var(--primary);
    color: var(--primary-light);
}

.friend-add-btn:hover {
    background: var(--border);
}

.friend-accept-btn {
    border-color: var(--primary);
    color: var(--primary-light);
}

.friend-accept-btn:hover {
    background: var(--border);
}

.friend-remove-btn:hover {
    border-color: var(--danger);
    color: #f87171;
    background: rgba(220, 53, 69, 0.08);
}

.friend-block-btn:hover {
    border-color: var(--warning);
    color: var(--warning);
    background: rgba(212, 160, 23, 0.08);
}

.friends-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--gray);
    font-size: 0.85rem;
}

/* ========== Raid Recovery Modal ========== */
.raid-recover-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.raid-recover-overlay.visible {
    display: flex;
}

.raid-recover-modal {
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    padding: 32px 28px 28px;
    max-width: 400px;
    width: 90vw;
    text-align: center;
    animation: modalSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    position: relative;
}

.raid-recover-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--warning), transparent);
    opacity: 0.5;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.raid-recover-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(212, 160, 23, 0.1);
    border: 1px solid rgba(212, 160, 23, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--warning);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 160, 23, 0.2); }
    50%      { box-shadow: 0 0 0 12px rgba(212, 160, 23, 0); }
}

.raid-recover-modal h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 8px;
}

.raid-recover-desc {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.5;
}

.raid-recover-details {
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    text-align: left;
}

.raid-recover-details .recover-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.raid-recover-details .recover-label {
    font-size: 0.8rem;
    color: var(--gray);
}

.raid-recover-details .recover-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--light);
}

.raid-recover-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.raid-recover-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid var(--border-solid);
    border-radius: 12px;
    background: transparent;
    color: var(--light-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.raid-recover-btn:hover {
    border-color: var(--primary);
    background: var(--dark);
}

.raid-recover-resume {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.raid-recover-resume:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.raid-recover-restart {
    border-color: var(--warning);
    color: var(--warning);
}

.raid-recover-restart:hover {
    background: rgba(212, 160, 23, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.raid-recover-abandon {
    border-color: transparent;
    color: var(--gray);
    font-weight: 500;
}

.raid-recover-abandon:hover {
    color: #f87171;
}

/* ========== Session / Raid Page ========== */

/* --- Page wrapper --- */
.raid-page {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 44px);
    padding: 24px 20px 40px;
    max-width: 960px;
    margin: 0 auto;
    overflow: hidden;
}

/* --- Floating particles --- */
.raid-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.raid-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s infinite ease-in-out;
}

.raid-particles span:nth-child(1) { left: 10%; animation-delay: 0s;   top: 80%; }
.raid-particles span:nth-child(2) { left: 30%; animation-delay: 1.5s; top: 70%; }
.raid-particles span:nth-child(3) { left: 50%; animation-delay: 3s;   top: 90%; }
.raid-particles span:nth-child(4) { left: 70%; animation-delay: 0.8s; top: 85%; }
.raid-particles span:nth-child(5) { left: 85%; animation-delay: 2.2s; top: 75%; }
.raid-particles span:nth-child(6) { left: 20%; animation-delay: 4s;   top: 95%; }

@keyframes particleFloat {
    0%   { opacity: 0; transform: translateY(0) scale(1); }
    20%  { opacity: 0.6; }
    50%  { opacity: 0.3; transform: translateY(-120px) scale(1.5); }
    100% { opacity: 0; transform: translateY(-250px) scale(0.5); }
}

/* --- Entrance animations --- */
.fade-in {
    animation: fadeIn 0.5s ease both;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== COMBAT ARENA ========== */
.combat-arena {
    position: relative;
    max-width: 700px;
    margin: 0 auto 20px;
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    overflow: hidden;
    z-index: 1;
    height: 160px;
}

/* Focus mode toggle button */
.combat-focus-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    color: var(--gray);
    font-size: 0.58rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 9px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
}

.combat-focus-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.combat-focus-btn.active {
    background: var(--darker);
    border-color: var(--primary);
    color: var(--primary);
}

/* Dimmed (focus) state — scene fades, HUD stays */
.combat-arena.focus-mode .combat-scene {
    opacity: 0.08;
    pointer-events: none;
}

.combat-arena.focus-mode .combat-hud {
    opacity: 0.4;
}

/* HUD overlays — top corners */
.combat-hud {
    position: absolute;
    top: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 3;
    max-width: 38%;
}

.combat-hud-boss  { left: 12px; align-items: flex-start; }
.combat-hud-player { right: 12px; align-items: flex-end; }

.combatant-name {
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.combatant-type {
    font-size: 0.55rem;
    color: var(--gray);
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.hp-bar-track {
    width: 120px;
    height: 6px;
    background: var(--medium);
    border-radius: 3px;
    overflow: hidden;
}

.hp-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.hp-bar-boss   { background: linear-gradient(90deg, #dc3545, #ff6b6b); }
.hp-bar-player { background: linear-gradient(90deg, var(--primary-dark), var(--primary)); transition: background 0.5s ease, width 0.6s ease; }
.hp-bar-player.warn  { background: linear-gradient(90deg, #b8860b, #ffd93d); }
.hp-bar-player.danger { background: linear-gradient(90deg, #8b0000, #dc3545); }
.hp-bar-player.shielded { box-shadow: 0 0 6px var(--primary-light); }
.hp-bar-player.damage-buffed { 
    background: linear-gradient(90deg, #ff6b35, #ff9558); 
    box-shadow: 0 0 8px #ff6b35, 0 0 16px rgba(255, 107, 53, 0.3);
    animation: damageBuffPulse 1s ease-in-out infinite;
}

@keyframes damageBuffPulse {
    0%, 100% { 
        box-shadow: 0 0 8px #ff6b35, 0 0 16px rgba(255, 107, 53, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 12px #ff6b35, 0 0 24px rgba(255, 107, 53, 0.5);
        transform: scale(1.02);
    }
}

.hp-label {
    font-size: 0.52rem;
    font-family: var(--font-mono);
    color: var(--gray);
}

/* Scene */
.combat-scene {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0;
    padding-bottom: 18px;
    transition: opacity 0.4s ease;
}

.combat-hud {
    transition: opacity 0.4s ease;
}

/* Ground */
.combat-ground {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-solid);
    opacity: 0.6;
}

/* Boss silhouette — abstract dark figure */
.boss-sprite {
    position: relative;
    z-index: 2;
    transform: scaleX(-1); /* face right (toward player) */
    animation: bossIdle 2.4s ease-in-out infinite;
    flex-shrink: 0;
    margin-right: 48px;
}

@keyframes bossIdle {
    0%, 100% { transform: scaleX(-1) translateY(0px); }
    50%       { transform: scaleX(-1) translateY(-4px); }
}

/* Player character sprite */
.player-sprite {
    position: relative;
    opacity: 0.5;
    z-index: 0;
    animation: scanline 10s linear infinite;
    pointer-events: none;
    margin-left: 48px;
    image-rendering: pixelated;
}

@keyframes playerIdle {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-3px); }
}

/* Attack lunge — player lurches forward */
.player-sprite.attacking {
    animation: playerAttack 0.35s ease-out forwards;
}

@keyframes playerAttack {
    0%   { transform: translateX(0) translateY(0); }
    40%  { transform: translateX(-22px) translateY(-4px); }
    100% { transform: translateX(0) translateY(0); }
}

/* Boss hit reel */
.boss-sprite.hit {
    animation: bossHit 0.3s ease-out forwards;
}

@keyframes bossHit {
    0%   { transform: scaleX(-1) translateX(0); filter: brightness(1); }
    30%  { transform: scaleX(-1) translateX(8px); filter: brightness(2.5); }
    100% { transform: scaleX(-1) translateX(0); filter: brightness(1); }
}

/* Player hurt */
.player-sprite.hurt {
    animation: playerHurt 0.3s ease-out forwards;
}

@keyframes playerHurt {
    0%   { transform: translateX(0); filter: brightness(1); }
    30%  { transform: translateX(10px); filter: brightness(0.4) sepia(1) saturate(5) hue-rotate(-10deg); }
    100% { transform: translateX(0); filter: brightness(1); }
}

/* Slash FX */
.slash-fx {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    font-size: 1.4rem;
    color: var(--primary-light);
    text-shadow: 0 0 8px var(--glow);
    transition: opacity 0.05s;
}

.slash-fx.visible {
    opacity: 1;
    animation: slashPop 0.4s ease-out forwards;
}

.slash-fx.boss-slash {
    color: #ff6b6b;
    text-shadow: 0 0 8px rgba(220,53,69,0.5);
}

@keyframes slashPop {
    0%   { opacity: 1; transform: translateX(-50%) scale(0.6) rotate(-15deg); }
    40%  { opacity: 1; transform: translateX(-50%) scale(1.3) rotate(5deg); }
    100% { opacity: 0; transform: translateX(-50%) scale(1) rotate(0deg); }
}

/* Combat Log */
.combat-log-wrap {
    max-width: 700px;
    margin: 0 auto 24px;
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.combat-log {
    max-height: 180px;
    overflow-y: auto;
    padding: 8px 12px;
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.combat-log::-webkit-scrollbar {
    width: 6px;
}

.combat-log::-webkit-scrollbar-track {
    background: transparent;
}

.combat-log::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.combat-log-entry {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--gray);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.combat-log-entry.log-crit { color: var(--primary-light); }
.combat-log-entry.log-boss { color: #ff6b6b; }
.combat-log-entry.log-info { color: var(--primary); }

/* ========== SKILL CHECK MODAL ========== */
.skill-check-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.skill-check-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.skill-check-modal {
    background: var(--dark);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 32px 28px 24px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 0 40px var(--glow);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-check-header {
    text-align: center;
}

.skill-check-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.skill-check-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 4px;
}

.skill-check-sub {
    font-size: 0.7rem;
    color: var(--gray);
}

.skill-check-timer-bar {
    width: 100%;
    height: 4px;
    background: var(--medium);
    border-radius: 2px;
    overflow: hidden;
}

.skill-check-timer-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.skill-check-timer-fill.danger {
    background: #dc3545;
}

.skill-check-phrase {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--light);
    text-align: center;
    background: var(--medium);
    border-radius: var(--radius);
    padding: 14px 16px;
    letter-spacing: 0.3px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-check-input {
    width: 100%;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    padding: 12px 14px;
    color: var(--light);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.skill-check-input:focus {
    border-color: var(--primary);
}

.skill-check-input.correct {
    border-color: var(--primary);
    background: var(--glass-border);
}

.skill-check-input.wrong {
    border-color: #dc3545;
    animation: inputShake 0.3s ease;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.skill-check-progress {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--gray);
    text-align: center;
}

.skill-check-feedback {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    min-height: 18px;
    color: var(--primary);
    font-family: var(--font-mono);
}

/* ========== RAID DURATION PICKER ========== */
.raid-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.raid-picker-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.raid-picker-modal {
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    padding: 28px 24px 20px;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: resultPop 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

.raid-picker-header { text-align: center; }

.raid-picker-subject {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.raid-picker-sub {
    font-size: 0.72rem;
    color: var(--gray);
}

.raid-picker-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.raid-duration-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 10px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--light);
    font-family: inherit;
}

.raid-duration-btn:hover {
    border-color: var(--primary);
    background: var(--darker);
    transform: translateY(-2px);
}

.raid-duration-featured {
    border-color: var(--primary);
    box-shadow: 0 0 16px var(--glow);
}

.raid-duration-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    opacity: 0.85;
}

.raid-duration-btn:hover .raid-duration-icon { opacity: 1; }
.raid-duration-featured .raid-duration-icon { opacity: 1; }

.raid-duration-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
}

.raid-duration-time {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--light);
}

.raid-duration-desc {
    font-size: 0.58rem;
    color: var(--gray);
    text-align: center;
}

.raid-picker-cancel {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 0.7rem;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    padding: 4px;
    transition: color 0.15s;
}

.raid-picker-cancel:hover { color: var(--light); }

/* ========== COMBAT RESULT OVERLAYS ========== */
.combat-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.combat-result-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.combat-result-modal {
    background: var(--dark);
    border-radius: var(--radius-lg);
    padding: 36px 32px 28px;
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    animation: resultPop 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

@keyframes resultPop {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.defeat-modal { border: 1px solid #dc3545; box-shadow: 0 0 40px rgba(220,53,69,0.2); }
.victory-modal { border: 1px solid var(--primary); box-shadow: 0 0 40px var(--glow); }

.result-icon { font-size: 3rem; line-height: 1; }

.result-title {
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.defeat-modal .result-title { color: #ff6b6b; }
.victory-modal .result-title { color: var(--primary); }

.result-sub {
    font-size: 0.75rem;
    color: var(--gray);
    max-width: 280px;
}

.result-stats {
    display: flex;
    gap: 20px;
    background: var(--medium);
    border-radius: var(--radius);
    padding: 10px 20px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--light-secondary);
    width: 100%;
    justify-content: center;
}

.result-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.result-stat-val { font-size: 1rem; font-weight: 700; color: var(--light); }

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
}

.result-btn {
    width: 100%;
    padding: 11px 16px;
    border-radius: var(--radius);
    font-size: 0.72rem;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.result-btn-primary {
    background: var(--primary);
    color: #000;
}

.result-btn-primary:hover { background: var(--primary-light); }

.result-btn-secondary {
    background: none;
    border: 1px solid var(--border-solid);
    color: var(--gray);
}

.result-btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ========== BREAK PHASE (CAMPFIRE) ========== */
.break-overlay {
    position: fixed;
    inset: 0;
    background: var(--darker);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.break-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.break-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding: 40px 24px;
}

/* Campfire */
.campfire {
    margin-bottom: 8px;
}

.fire-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    height: 60px;
}

.flame {
    display: block;
    width: 16px;
    border-radius: 50% 50% 20% 20%;
    animation: flicker 0.9s ease-in-out infinite alternate;
    transform-origin: bottom center;
}

.flame1 { height: 40px; background: linear-gradient(to top, #ff6b35, #ffd93d); animation-delay: 0s; }
.flame2 { height: 55px; background: linear-gradient(to top, #dc3545, #ff6b35, #ffd93d); animation-delay: 0.15s; width: 20px; }
.flame3 { height: 36px; background: linear-gradient(to top, #ff6b35, #ffd93d); animation-delay: 0.3s; }

@keyframes flicker {
    0% { transform: scaleX(1) scaleY(1) rotate(-2deg); }
    100% { transform: scaleX(0.85) scaleY(1.1) rotate(2deg); }
}

.fire-log {
    width: 60px;
    height: 12px;
    background: linear-gradient(90deg, #4a2c0a, #6b3d15, #4a2c0a);
    border-radius: 6px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.break-title {
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--light);
}

.break-subtitle {
    font-size: 0.8rem;
    color: var(--gray);
    max-width: 300px;
}

.break-timer-display {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--primary);
    letter-spacing: 2px;
}

.break-suggestion {
    font-size: 0.78rem;
    color: var(--light-secondary);
    max-width: 320px;
    line-height: 1.6;
    min-height: 40px;
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    padding: 10px 16px;
}

.break-skip-btn {
    margin-top: 8px;
    background: none;
    border: 1px solid var(--border-solid);
    color: var(--gray);
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 0.7rem;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
}

.break-skip-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* --- Subject banner --- */
.raid-banner {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.raid-banner-subject {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--light);
    letter-spacing: -0.3px;
    margin-bottom: 10px;
}

.raid-banner-tags {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.raid-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius);
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    color: var(--light-secondary);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.raid-tag-conf {
    color: var(--primary-light);
}

/* --- 2-column grid --- */
.raid-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
    position: relative;
    z-index: 1;
}

/* --- Timer card (left) --- */
.raid-timer-card {
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    padding: 40px 28px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.raid-timer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.4;
}

/* SVG ring timer */
.raid-timer-ring {
    position: relative;
    width: 220px;
    height: 220px;
    margin-bottom: 28px;
}

.raid-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.raid-ring-track {
    fill: none;
    stroke: var(--border-solid);
    stroke-width: 4;
}

.raid-ring-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 1s linear;
    filter: drop-shadow(0 0 6px var(--glow));
}

.raid-timer-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.raid-timer-value {
    font-size: 2.6rem;
    font-weight: 300;
    color: var(--light);
    letter-spacing: 3px;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
    text-shadow: 0 0 16px var(--glow);
}

.raid-timer-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray);
    margin-top: 2px;
}

/* Timer controls */
.raid-timer-controls {
    display: flex;
    gap: 10px;
}

.raid-ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    background: transparent;
    color: var(--light-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.raid-ctrl-btn:hover {
    background: var(--medium);
    border-color: var(--primary);
    color: var(--primary-light);
}

.raid-ctrl-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.raid-ctrl-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

/* --- Sidebar (right) --- */
.raid-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Check-in card */
.raid-checkin-card {
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
}

.raid-checkin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

.raid-checkin-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.raid-checkin-header svg {
    color: var(--primary);
}

.raid-checkin-countdown {
    text-align: center;
    margin-bottom: 16px;
}

.raid-checkin-time {
    display: block;
    font-size: 2rem;
    font-weight: 300;
    color: var(--primary-light);
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
    text-shadow: 0 0 10px var(--glow);
}

.raid-checkin-until {
    font-size: 0.7rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.raid-progress-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 18px;
}

.raid-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width 1s linear;
    box-shadow: 0 0 8px var(--glow);
}

.raid-checkin-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: checkinPulse 3s ease-in-out infinite;
}

.raid-checkin-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.raid-checkin-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    animation: none;
}

@keyframes checkinPulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--glow); }
    50%      { box-shadow: 0 0 0 10px transparent; }
}

/* Stats card */
.raid-stats-card {
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
}

.raid-stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

.raid-stats-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.raid-stats-header svg {
    color: var(--primary);
}

.raid-stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.raid-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--medium);
    border-radius: var(--radius);
    border: 1px solid var(--border-solid);
}

.raid-stat-label {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
}

.raid-stat-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--light);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}

.raid-stat-good {
    color: var(--primary-light);
}

.raid-stat-bad {
    color: #f87171;
}

/* ========== Profile Page Styles ========== */
.nav-back {
    color: var(--light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-back:hover {
    color: var(--primary-light);
}

.profile-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 0 12px var(--glow);
    border: 1px solid var(--primary);
}

.profile-details h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 2px;
}

.profile-email {
    color: var(--gray);
    font-size: 0.85rem;
}

.profile-joined {
    color: var(--gray);
    font-size: 0.78rem;
    margin-top: 4px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.profile-stat-item {
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.profile-stat-item .stat-value {
    font-family: var(--font-mono);
    font-size: 1.3rem;
}

/* ---- Character Display ---- */
.character-display {
    display: flex;
    align-items: center;
    gap: 24px;
}

.character-preview {
    width: 140px;
    min-height: 140px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.character-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
}

.character-preview svg {
    position: relative;
    z-index: 1;
}

.character-info {
    flex: 1;
    min-width: 0;
}

.character-info h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 2px;
}

.profile-identity {
    font-size: 0.75rem;
    color: var(--light-secondary);
    margin-bottom: 4px;
}

.identity-sep {
    color: var(--gray);
    margin: 0 4px;
}

/* ---- XP Bar ---- */
.xp-display {
    margin-top: 12px;
}

.xp-level {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-light);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 0 8px var(--glow);
    margin-bottom: 6px;
}

.xp-level span {
    font-size: 1rem;
}

.xp-bar-wrap {
    height: 6px;
    background: var(--border-solid);
    border-radius: 0;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.5s ease;
    box-shadow: 0 0 8px var(--glow);
}

.xp-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--gray);
    font-family: var(--font-mono);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* ---- Customization Panel ---- */
.custom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.custom-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
}

.custom-input,
.custom-select {
    padding: 8px 10px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    color: var(--light);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.custom-input:focus,
.custom-select:focus {
    border-color: var(--primary);
}

.custom-input::placeholder {
    color: var(--gray);
}

.custom-options {
    display: flex;
    gap: 4px;
}

.custom-opt {
    flex: 1;
    padding: 6px 8px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    color: var(--light-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.custom-opt:hover {
    border-color: var(--primary);
    color: var(--light);
}

.custom-opt.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.custom-colors {
    display: flex;
    gap: 6px;
}

.custom-color {
    width: 28px;
    height: 28px;
    border-radius: var(--radius);
    border: 2px solid var(--border-solid);
    cursor: pointer;
    transition: all 0.15s ease;
}

.custom-color:hover {
    border-color: var(--light-secondary);
    transform: scale(1.1);
}

.custom-color.active {
    border-color: var(--primary-light);
    box-shadow: 0 0 8px var(--glow);
    transform: scale(1.1);
}

/* ---- Coins Display ---- */
.coins-display {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #d4a017;
    letter-spacing: 0.5px;
}

.coins-display svg {
    color: #d4a017;
    filter: drop-shadow(0 0 4px rgba(212, 160, 23, 0.4));
}

/* ---- Identity & Colors Form ---- */
.custom-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.custom-colors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px 0;
}

.custom-color {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
    padding: 0;
    position: relative;
}

.custom-color:hover {
    transform: scale(1.15);
    border-color: var(--primary);
}

.custom-color.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--glow), 0 0 10px var(--glow);
    transform: scale(1.1);
}

.custom-color.active::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
}

/* ---- Equipment Slots ---- */
.equip-slots {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.equip-slot {
    display: flex;
    align-items: center;
    gap: 12px;
}

.equip-slot-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    min-width: 56px;
    flex-shrink: 0;
}

.equip-slot-items {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.equip-item {
    padding: 6px 12px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    color: var(--light-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.equip-item:hover {
    border-color: var(--primary);
    color: var(--light);
}

.equip-item.equipped {
    background: var(--border);
    border-color: var(--primary);
    color: var(--primary-light);
}

.equip-badge {
    font-size: 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    opacity: 0.8;
}

/* ========== Research Page ========== */
.research-page {
    max-width: 720px;
    padding-top: 30px;
    padding-bottom: 60px;
}

.research-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--light);
    margin-bottom: 12px;
}

.research-intro {
    font-size: 0.78rem;
    color: var(--light-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.research-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-solid);
}

.research-section:last-of-type {
    border-bottom: none;
}

.research-section h2 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.research-finding {
    font-size: 0.72rem;
    color: var(--light-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.research-finding em {
    color: var(--light);
    font-style: italic;
}

.research-citation {
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-top: 10px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.citation-authors {
    font-size: 0.62rem;
    color: var(--gray);
    font-weight: 600;
}

.citation-title {
    font-size: 0.68rem;
    color: var(--light);
    font-weight: 500;
    font-style: italic;
}

.citation-journal {
    font-size: 0.6rem;
    color: var(--gray);
}

.citation-link {
    font-size: 0.6rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-top: 4px;
}

.citation-link:hover {
    text-decoration: underline;
}

.research-footer {
    margin-top: 32px;
    padding: 16px;
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
}

.research-footer p {
    font-size: 0.62rem;
    color: var(--gray);
    line-height: 1.6;
}

/* ========== Site Footer ========== */
.site-footer {
    border-top: 1px solid var(--border-solid);
    padding: 24px 24px 20px;
    margin-top: 40px;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.footer-brand {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--light-secondary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.footer-tagline {
    font-size: 0.6rem;
    color: var(--gray);
    font-style: italic;
    margin-bottom: 4px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-sep {
    color: var(--border-solid);
    font-size: 0.6rem;
}

.footer-copy {
    font-size: 0.58rem;
    color: var(--gray);
}

.site-footer a {
    font-size: 0.6rem;
    color: var(--gray);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--primary);
}

/* ========== Admin Console ========== */
.admin-console {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 240px;
    background: #0a0a0a;
    border-top: 2px solid var(--primary);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    font-family: 'JetBrains Mono', monospace;
    animation: adminSlideUp 0.3s ease-out;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
}

.admin-console.admin-hidden {
    animation: adminSlideDown 0.25s ease-in forwards;
}

@keyframes adminSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes adminSlideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

.admin-console-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: #111;
    border-bottom: 1px solid #222;
    flex-shrink: 0;
}

.admin-console-title {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary);
    text-transform: uppercase;
}

.admin-console-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
}

.admin-console-close:hover {
    color: #f87171;
}

.admin-console-output {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-line {
    font-size: 0.68rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-line.admin-cmd {
    color: #888;
}

.admin-line.admin-response {
    color: #e0e0e0;
}

.admin-line.admin-system {
    color: var(--primary);
    opacity: 0.7;
}

.admin-line.admin-error {
    color: #f87171;
}

.admin-console-input-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-top: 1px solid #222;
    background: #0d0d0d;
    flex-shrink: 0;
}

.admin-prompt {
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    margin-right: 8px;
}

.admin-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--light);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    caret-color: var(--primary);
}

.admin-input::placeholder {
    color: #444;
}

/* ========== Shop Page ========== */
.shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.shop-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--light);
    letter-spacing: -0.5px;
}

.shop-wallet {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #d4a017;
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    padding: 6px 12px;
}

.shop-wallet svg {
    filter: drop-shadow(0 0 4px rgba(212, 160, 23, 0.4));
}

.shop-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.shop-filter {
    padding: 6px 14px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    color: var(--light-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.shop-filter:hover {
    border-color: var(--primary);
    color: var(--light);
}

.shop-filter.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.shop-item {
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.shop-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.shop-item-has {
    border-color: var(--primary);
    background: var(--glass-border);
}

.shop-item-is-locked {
    opacity: 0.5;
}

.shop-item-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--medium);
    border-radius: var(--radius);
    border: 1px solid var(--border-solid);
}

.shop-item-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--light);
}

.shop-item-desc {
    font-size: 0.62rem;
    color: var(--gray);
    line-height: 1.4;
    min-height: 2.8em;
}

.shop-item-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.shop-item-price {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #d4a017;
}

.shop-item-owned {
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    background: var(--border);
    padding: 3px 8px;
    border-radius: var(--radius);
}

.shop-item-locked {
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    background: var(--medium);
    padding: 3px 8px;
    border-radius: var(--radius);
}

.shop-buy-btn {
    padding: 5px 12px;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.shop-buy-btn:hover:not(:disabled) {
    box-shadow: 0 0 12px var(--glow);
}

.shop-buy-btn:disabled {
    background: var(--medium);
    border-color: var(--border-solid);
    color: var(--gray);
    cursor: not-allowed;
}

.shop-empty {
    color: var(--gray);
    font-size: 0.75rem;
    text-align: center;
    padding: 40px 0;
    grid-column: 1 / -1;
}

/* ---- Curtain Gag ---- */
.curtain-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: repeating-linear-gradient(
        180deg,
        #8b0000 0px, #8b0000 8px,
        #6b0000 8px, #6b0000 10px
    );
    display: flex;
    align-items: center;
    justify-content: center;
    animation: curtainDrop 0.4s ease-out;
    border-radius: var(--radius);
}

.curtain-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    text-align: center;
    padding: 8px;
}

.curtain-closing {
    animation: curtainRise 0.5s ease-in forwards;
}

@keyframes curtainDrop {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@keyframes curtainRise {
    from { transform: translateY(0); }
    to { transform: translateY(-100%); }
}

.equip-tip {
    font-size: 0.65rem;
    color: var(--gray);
    margin-bottom: 12px;
    line-height: 1.4;
    opacity: 0.7;
}

.equip-badge-equip {
    opacity: 0;
    transition: opacity 0.15s ease;
    color: var(--light-secondary);
}

.equip-item:hover .equip-badge-equip {
    opacity: 0.6;
}

.equip-item.equipped .equip-badge {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.equip-item.equipped:hover .equip-badge {
    opacity: 1;
    color: #f87171;
}

.equip-empty {
    font-size: 0.68rem;
    color: var(--gray);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 5px;
}

.equip-info-icon {
    position: relative;
    cursor: help;
    color: var(--gray);
    display: inline-flex;
    align-items: center;
    transition: color 0.15s ease;
}

.equip-info-icon:hover {
    color: var(--primary-light);
}

.equip-info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 0.65rem;
    font-style: normal;
    font-weight: 500;
    color: var(--light-secondary);
    white-space: normal;
    width: 200px;
    text-align: center;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.equip-info-icon:hover::after {
    opacity: 1;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.setting-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--light);
}

.setting-description {
    font-size: 0.78rem;
    color: var(--gray);
}

.setting-control {
    padding: 7px 10px;
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    background: var(--dark);
    color: var(--light);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.setting-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--glow);
}

/* ========== Notes Panel ========== */
.notes-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.notes-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.notes-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--dark);
    border-left: 1px solid var(--border-solid);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.4);
}

.notes-panel.open {
    transform: translateX(0);
}

.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.notes-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--light);
}

.notes-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notes-saved-indicator {
    font-size: 0.7rem;
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notes-saved-indicator.visible {
    opacity: 1;
}

.notes-close-btn {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.notes-close-btn:hover {
    color: var(--light);
}

.notes-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.notes-tool-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--gray);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s ease;
}

.notes-tool-btn:hover {
    background: var(--dark);
    color: var(--light);
    border-color: var(--border);
}

.notes-tool-btn:active {
    background: var(--primary);
    color: white;
}

.notes-clear-btn {
    margin-left: auto;
    color: #f87171;
}

.notes-clear-btn:hover {
    background: rgba(220, 53, 69, 0.15);
    color: #f87171;
    border-color: rgba(220, 53, 69, 0.3);
}

.notes-tool-divider {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 4px;
}

.notes-editor {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
    color: var(--light);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    line-height: 1.7;
    outline: none;
    min-height: 0;
}

.notes-editor:empty::before {
    content: attr(placeholder);
    color: var(--gray);
    pointer-events: none;
}

.notes-editor ul, .notes-editor ol {
    padding-left: 20px;
    margin: 4px 0;
}

.notes-editor li {
    margin: 2px 0;
}

.notes-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.notes-info {
    font-size: 0.7rem;
    color: var(--gray);
}

/* ========== Raid Log Page ========== */
.raidlog-content {
    max-width: 800px;
    margin: 24px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

.raidlog-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.raidlog-stat {
    text-align: center;
    padding: 14px 8px;
    background: var(--medium);
    border-radius: var(--radius);
    border: 1px solid var(--border-solid);
}

.raidlog-stat .stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 2px;
    font-family: var(--font-mono);
    text-shadow: 0 0 8px var(--glow);
}

.raidlog-stat .stat-label {
    font-size: 0.65rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.raid-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.raid-day-group {
    margin-bottom: 8px;
}

.raid-day-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-left: 4px;
}

.raid-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    transition: all 0.15s ease;
}

.raid-entry:hover {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--glass-border);
}

.raid-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    background: var(--glass-border);
    border: 1px solid var(--border);
    color: var(--primary);
}

.raid-details {
    flex: 1;
    min-width: 0;
}

.raid-subject {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--light);
    margin-bottom: 2px;
}

.raid-meta {
    font-size: 0.72rem;
    color: var(--gray);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.raid-duration {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-light);
    white-space: nowrap;
    font-family: var(--font-mono);
    text-shadow: 0 0 6px var(--glow);
}

.raid-checkin-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.raid-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 500;
}

.raid-badge.completed {
    background: var(--border);
    color: var(--primary-light);
}

.raid-badge.missed {
    background: rgba(220, 53, 69, 0.15);
    color: #f87171;
}

.raid-badge svg {
    vertical-align: -1px;
}

.raid-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.raid-status-completed {
    background: var(--border);
    color: var(--primary-light);
}

.raid-status-abandoned {
    background: rgba(212, 160, 23, 0.12);
    color: var(--warning);
}

.raid-entry-abandoned {
    opacity: 0.7;
    border-left: 2px solid var(--warning);
}

.raid-entry-abandoned .raid-icon {
    color: var(--warning);
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .raid-grid {
        grid-template-columns: 1fr;
    }

    .raid-timer-ring {
        width: 180px;
        height: 180px;
    }

    .raid-timer-value {
        font-size: 2rem;
    }

    .raid-timer-card {
        padding: 28px 16px;
    }

    .raid-banner-subject {
        font-size: 1.2rem;
    }

    .signup-card {
        padding: 28px;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .setting-item {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .raidlog-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .raid-entry {
        flex-wrap: wrap;
    }

    .app-nav-inner {
        height: 40px;
        flex-wrap: wrap;
        position: relative;
    }

    .nav-hamburger {
        display: flex;
    }

    .app-nav-links {
        display: none;
        position: absolute;
        top: 40px;
        left: 0;
        right: 0;
        background: var(--dark);
        border-bottom: 1px solid var(--border-solid);
        flex-direction: column;
        padding: 6px 0;
        z-index: 200;
    }

    .app-nav-links.open {
        display: flex;
    }

    .app-nav-links a {
        padding: 10px 16px;
        border-radius: 0;
        border-left: 3px solid transparent;
        letter-spacing: 0.5px;
    }

    .app-nav-links a.active {
        border-left-color: var(--primary);
        box-shadow: none;
    }

    .app-nav-right .profile-link,
    .app-nav-right #heroName {
        display: none;
    }

    .container {
        padding: 12px;
    }

    .card {
        padding: 16px;
    }

    .tutorial-container {
        padding: 32px 20px;
    }

    .affirmation-prompts {
        gap: 14px;
    }

    .custom-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== Tutorial Overlay ========== */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--darker);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.tutorial-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.tutorial-container {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 100%;
    padding: 40px 24px;
    text-align: center;
}

.tutorial-step {
    animation: tutorialFadeIn 0.4s ease;
}

@keyframes tutorialFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.tutorial-icon {
    color: var(--primary);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 16px var(--glow));
}

.affirmation-icon {
    color: #f87171;
    filter: drop-shadow(0 0 16px rgba(248, 113, 113, 0.35));
}

.tutorial-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--light);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.tutorial-text {
    font-size: 0.88rem;
    color: var(--light-secondary);
    margin-bottom: 6px;
    line-height: 1.5;
}

.tutorial-subtext {
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 28px;
    line-height: 1.5;
}

.tutorial-next-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tutorial-next-btn:hover {
    box-shadow: 0 0 20px var(--glow);
    background: var(--primary-dark);
}

.tutorial-next-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
}

.tutorial-finish-btn {
    margin-top: 24px;
}

/* Tutorial progress dots */
.tutorial-progress {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10000;
}

.tutorial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-solid);
    transition: all 0.3s ease;
}

.tutorial-dot.active {
    background: var(--primary);
    box-shadow: 0 0 8px var(--glow);
}

/* ---- Affirmation Wall ---- */
.affirmation-prompts {
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
    margin-top: 24px;
}

.affirmation-item {
    position: relative;
    padding: 16px;
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.affirmation-item.locked {
    opacity: 0.35;
    pointer-events: none;
}

.affirmation-item.complete {
    border-color: var(--primary);
    background: var(--glass-border);
}

.affirmation-target {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 10px;
    font-style: italic;
    letter-spacing: 0.3px;
}

.affirmation-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    color: var(--light);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.affirmation-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--glass-border);
}

.affirmation-input::placeholder {
    color: var(--gray);
    font-style: italic;
}

.affirmation-input:disabled {
    opacity: 0.5;
}

.affirmation-check {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.affirmation-check.visible {
    opacity: 1;
    transform: scale(1);
}

/* ========== Dashboard Hero Row ========== */
.dashboard-hero-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
}

/* Hero Card */
.hero-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 16px 16px;
    position: relative;
    text-align: center;
}

.hero-card-avatar {
    image-rendering: pixelated;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 10px var(--glow));
}

.hero-card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.hero-card-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--light);
    letter-spacing: 0.5px;
}

.hero-card-level {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--gray);
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: 999px;
    padding: 2px 7px;
    transition: all 0.2s ease;
}

.hero-streak-badge.streak-active {
    color: #f97316;
    border-color: rgba(249, 115, 22, 0.4);
    background: rgba(249, 115, 22, 0.08);
}

.hero-card-xp-bar {
    width: 100%;
    height: 4px;
    background: var(--medium);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2px;
}

.hero-card-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
    transition: width 0.6s ease;
    box-shadow: 0 0 6px var(--glow);
}

.hero-card-xp-label {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--gray);
}

.hero-card-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.62rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    text-decoration: none;
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    padding: 5px 10px;
    transition: all 0.15s ease;
    margin-top: 4px;
}

.hero-card-edit:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Friend Activity Card */
.friend-activity-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-friend-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-friend-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: var(--darker);
    border: 1px solid var(--border-solid);
    transition: background 0.1s ease;
}

.dash-friend-row:hover {
    background: var(--medium);
}

.dash-friend-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.72rem;
    color: var(--primary);
    flex-shrink: 0;
}

.dash-friend-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.dash-friend-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--light);
}

.dash-friend-meta {
    font-size: 0.6rem;
    color: var(--gray);
    font-family: var(--font-mono);
}

.dash-friend-stat {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-light);
    flex-shrink: 0;
    text-align: right;
}

.dash-friend-stat span {
    font-size: 0.55rem;
    color: var(--gray);
    font-weight: 400;
}

@media (max-width: 600px) {
    .dashboard-hero-row {
        grid-template-columns: 1fr;
    }
}

/* ========== Leaderboard Page ========== */
.leaderboard-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 0 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.leaderboard-header {
    margin-bottom: 4px;
}

.leaderboard-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--light);
    letter-spacing: -0.3px;
}

.leaderboard-subtitle {
    font-size: 0.72rem;
    color: var(--gray);
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* Tabs */
.lb-tabs {
    display: flex;
    gap: 6px;
    background: var(--darker);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    padding: 4px;
}

.lb-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--gray);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.lb-tab:hover {
    color: var(--light);
    background: var(--medium);
}

.lb-tab.active {
    background: var(--medium);
    color: var(--primary);
    border: 1px solid var(--border-solid);
}

/* Board */
.lb-board {
    background: var(--darker);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.lb-loading {
    padding: 40px;
    text-align: center;
    color: var(--gray);
    font-size: 0.78rem;
    font-family: var(--font-mono);
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-solid);
    transition: background 0.1s ease;
}

.lb-row:last-child {
    border-bottom: none;
}

.lb-row:hover {
    background: var(--medium);
}

.lb-row-you {
    background: var(--glass-border);
    border-left: 2px solid var(--primary);
}

.lb-row-you:hover {
    background: var(--border);
}

.lb-rank {
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.lb-medal {
    font-size: 1rem;
}

.lb-rank-num {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--gray);
}

.lb-row-top .lb-rank-num {
    color: var(--primary);
}

.lb-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--primary);
    flex-shrink: 0;
}

.lb-row-you .lb-avatar {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--glow);
}

.lb-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.lb-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lb-you-badge {
    font-size: 0.52rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 3px;
    padding: 1px 5px;
}

.lb-secondary {
    font-size: 0.62rem;
    color: var(--gray);
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-light);
    text-shadow: 0 0 8px var(--glow);
    flex-shrink: 0;
    text-align: right;
}

/* Last refresh timestamp */
.lb-refresh {
    text-align: center;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

/* No-friends nudge */
.lb-nudge {
    background: var(--darker);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--gray);
    font-size: 0.78rem;
}

.lb-nudge svg {
    flex-shrink: 0;
    color: var(--primary);
    opacity: 0.7;
}

.lb-nudge a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.lb-nudge a:hover {
    text-decoration: underline;
}

/* ========== Invite / Referral ========== */
.friends-invite-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    background: var(--glass-border);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.friends-invite-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--gray);
}

.friends-invite-text svg {
    flex-shrink: 0;
    color: var(--primary);
}

.friends-invite-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.friends-invite-btn:hover {
    opacity: 0.85;
}

.friends-invite-btn.copied {
    background: var(--primary-light);
}

.ref-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    background: var(--glass-border);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 16px;
}

.ref-banner svg {
    flex-shrink: 0;
    color: var(--primary);
}

.ref-banner strong {
    color: var(--primary-light);
}

/* ========== Achievements ========== */
.achievements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 480px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

.achieve-badge {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--medium);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius);
    transition: all 0.15s ease;
    position: relative;
}

.achieve-badge.earned {
    border-color: var(--primary);
    background: var(--glass-border);
}

.achieve-badge.locked {
    opacity: 0.6;
}

.achieve-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 1px;
}

.achieve-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.achieve-name {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light);
}

.achieve-badge.earned .achieve-name {
    color: var(--primary-light);
}

.achieve-desc {
    font-size: 0.65rem;
    color: var(--gray);
    line-height: 1.3;
}

.achieve-progress-wrap {
    width: 100%;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.achieve-progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.achieve-progress-label {
    font-size: 0.58rem;
    font-family: var(--font-mono);
    color: var(--gray);
}

.achieve-check {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    margin-top: 1px;
}

/* ========== Toast Notifications ========== */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--light);
    min-width: 220px;
    max-width: 340px;
    pointer-events: all;
    animation: toastIn 0.2s ease;
    border-left: 3px solid var(--primary);
}

.toast.toast-error {
    border-left-color: var(--danger);
}

.toast.toast-warning {
    border-left-color: var(--warning);
}

.toast.toast-out {
    animation: toastOut 0.2s ease forwards;
}

.toast-icon {
    flex-shrink: 0;
    color: var(--primary);
}

.toast.toast-error .toast-icon {
    color: var(--danger);
}

.toast.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-msg {
    flex: 1;
    line-height: 1.4;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(6px); }
}

@media (max-width: 600px) {
    #toast-container {
        bottom: 16px;
        right: 12px;
        left: 12px;
    }
    .toast {
        max-width: 100%;
    }
}

/* ========== Combat System ========== */

.skill-check-modal,
.break-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.skill-check-content,
.break-content {
    background: var(--dark);
    border: 1px solid var(--border-solid);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.skill-check-content h3,
.break-content h3 {
    margin: 0 0 16px 0;
    font-family: var(--font-heading);
    color: var(--light);
    font-size: 1.4rem;
}

.skill-check-content p {
    color: var(--gray);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.phrase-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.phrase-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--darker);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.phrase-target {
    font-family: var(--font-mono);
    color: var(--gray);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.phrase-input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border);
    color: var(--light);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 4px 8px;
    outline: none;
    transition: border-color 0.2s;
}

.phrase-input:focus {
    border-color: var(--primary);
}

.phrase-input.phrase-complete {
    border-color: var(--success);
    color: var(--success);
}

.skill-timer {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.campfire {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: flicker 2s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.95); }
}

.break-timer {
    font-family: var(--font-mono);
    font-size: 3rem;
    color: var(--primary);
    margin: 24px 0;
}

.break-suggestions {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* Premium Card */
.premium-card {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.premium-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(167, 139, 250, 0.1);
}

.premium-card-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
}

.premium-badge {
    display: inline-block;
    background: rgba(167, 139, 250, 0.15);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-card-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.premium-description {
    color: var(--light-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.premium-description strong {
    color: var(--primary);
}

.premium-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.premium-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--light-secondary);
    font-size: 0.9rem;
}

.premium-feature svg {
    color: var(--primary);
    flex-shrink: 0;
}

.premium-upgrade-btn {
    padding: 12px 24px;
    background: rgba(167, 139, 250, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
    cursor: not-allowed;
    opacity: 0.6;
}

.premium-upgrade-btn:hover:not(:disabled) {
    background: var(--primary);
    color: var(--darker);
}

.premium-note {
    color: var(--gray);
    font-size: 0.85rem;
    margin: 0;
    text-align: center;
}

/* Tester Badge */
.tester-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(60, 176, 67, 0.15), rgba(93, 212, 102, 0.1));
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 8px 0;
    animation: badge-glow 2s ease-in-out infinite;
}

.tester-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@keyframes badge-glow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(60, 176, 67, 0.3);
    }
    50% {
        box-shadow: 0 0 16px rgba(60, 176, 67, 0.5);
    }
}

.tester-badge-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: rgba(60, 176, 67, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 20px 0;
}

.tester-badge-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light);
}

.tester-badge-desc {
    font-size: 0.9rem;
    color: var(--light-secondary);
    text-align: center;
    max-width: 300px;
}

/* ============================================================
   Notification Bell + Dropdown Panel
   ============================================================ */
.notif-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notif-bell {
    position: relative;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--light);
    cursor: pointer;
    padding: 0;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.notif-bell:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
}
.notif-bell:active { transform: scale(0.96); }

.notif-bell.has-unread svg {
    color: var(--primary);
    animation: bell-shake 1.8s ease-in-out infinite;
    transform-origin: top center;
}
@keyframes bell-shake {
    0%, 92%, 100% { transform: rotate(0); }
    94% { transform: rotate(8deg); }
    96% { transform: rotate(-8deg); }
    98% { transform: rotate(4deg); }
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: var(--bg-secondary, #161616);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    z-index: 1000;
    overflow: hidden;
    animation: notif-panel-in 0.18s ease-out;
}
@keyframes notif-panel-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.notif-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--glass-border);
}
.notif-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--light);
    letter-spacing: 0.2px;
}
.notif-mark-all {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s ease;
}
.notif-mark-all:hover { background: var(--glass-bg); }

.notif-panel-list {
    max-height: 420px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px 12px 22px;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
    position: relative;
}
.notif-item:hover { background: var(--glass-bg); }
.notif-item:last-child { border-bottom: none; }

.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.notif-item-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--glass-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.notif-item-body {
    flex: 1;
    min-width: 0;
}
.notif-item-msg {
    font-size: 13px;
    line-height: 1.4;
    color: var(--light);
    word-wrap: break-word;
}
.notif-item-msg strong { color: var(--primary); font-weight: 600; }
.notif-item-time {
    display: block;
    font-size: 11px;
    color: var(--light-secondary);
    margin-top: 4px;
    letter-spacing: 0.2px;
}

.notif-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--light-secondary);
    font-size: 13px;
}

@media (max-width: 768px) {
    .notif-panel {
        width: 320px;
        right: -8px;
    }
}

/* Loading Skeletons - CSS Only */
.skeleton {
    background: linear-gradient(90deg, var(--medium) 25%, var(--border-solid) 50%, var(--medium) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

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

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text-sm {
    height: 12px;
    margin-bottom: 6px;
    border-radius: 3px;
}

.skeleton-text-lg {
    height: 24px;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-lg);
}

.skeleton-button {
    height: 40px;
    width: 120px;
    border-radius: var(--radius);
}

.skeleton-badge {
    height: 20px;
    width: 60px;
    border-radius: 10px;
}

/* Improved Button Hover States */
.btn {
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--glow);
}

.btn:active {
    transform: translateY(0);
}

/* Improved Card Polish */
.card {
    transition: all 0.2s ease;
}

.card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px var(--glow);
}

/* Smoother Transitions */
* {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
