:root {
        --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    --radius-sm: 14px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;

        
    --bg-primary: #eaf2ff;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.88);
    --accent: #2563eb;
    --accent-secondary: #38bdf8;
    --accent-tertiary: #7dd3fc;
    --text-primary: #16305c;
    --text-secondary: #4b6a9b;
    --text-muted: #8aa6cd;
    --text-tertiary: #a9c0e0;
    --border: rgba(37, 99, 235, 0.16);
    --shadow: 0 18px 38px -18px rgba(37, 99, 235, 0.30);
    --shadow-colored: 0 20px 42px -16px rgba(37, 99, 235, 0.38);
    --gradient-main: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(230, 241, 255, 0.82) 100%);
    --blur: blur(18px);
}

[data-theme="dark"] {
        --bg-primary: #eaf2ff;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.88);
    --accent: #2563eb;
    --accent-secondary: #38bdf8;
    --accent-tertiary: #7dd3fc;
    --text-primary: #16305c;
    --text-secondary: #4b6a9b;
    --text-muted: #8aa6cd;
    --text-tertiary: #a9c0e0;
    --border: rgba(37, 99, 235, 0.16);
    --shadow: 0 18px 38px -18px rgba(37, 99, 235, 0.30);
    --shadow-colored: 0 20px 42px -16px rgba(37, 99, 235, 0.38);
    --gradient-main: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(230, 241, 255, 0.82) 100%);
    --blur: blur(18px);
}

[data-theme="light"] {
    --bg-primary: #eaf2ff;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.92);
    --accent: #2563eb;
    --accent-secondary: #0ea5e9;
    --accent-tertiary: #7dd3fc;
    --text-primary: #16305c;
    --text-secondary: #4b6a9b;
    --text-muted: #8aa6cd;
    --text-tertiary: #a3bade;
    --border: rgba(37, 99, 235, 0.16);
    --shadow: 0 18px 38px -18px rgba(37, 99, 235, 0.28);
    --shadow-colored: 0 20px 42px -16px rgba(37, 99, 235, 0.34);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(233, 242, 255, 0.8) 100%);
}


[data-theme="vip"] {
    --bg-primary: #fdf6e9;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --accent: #d98a1f;
    --accent-secondary: #f0b429;
    --accent-tertiary: #ffd98a;
    --text-primary: #3d2c0c;
    --text-secondary: #7a5c1e;
    --text-muted: #b0905c;
    --text-tertiary: #c9ab7c;
    --border: rgba(217, 138, 31, 0.18);
    --shadow: 0 18px 38px -18px rgba(217, 138, 31, 0.30);
    --shadow-colored: 0 20px 42px -16px rgba(217, 138, 31, 0.36);
    --gradient-main: linear-gradient(135deg, #d98a1f 0%, #f0b429 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(253, 243, 226, 0.85) 100%);
    --blur: blur(18px);
}

[data-theme="vip"] .navbar::after {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(240, 199, 94, 0.15) 15%, #f7d379 50%, rgba(240, 199, 94, 0.15) 85%, transparent);
    opacity: .95;
    pointer-events: none;
}
[data-theme="vip"] .navbar {
    background: linear-gradient(180deg, rgba(23, 18, 8, 0.9), rgba(15, 12, 6, 0.7));
}

[data-theme="vip"] .theme-toggle-btn { display: none; }
[data-theme="vip"] .vip-chip { display: inline-flex; }
.vip-chip { display: none; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: linear-gradient(135deg, #ffd76e, #f2a900); color: #1a1206; box-shadow: 0 6px 16px rgba(240, 199, 94, .45); letter-spacing: .5px; }

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

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(44% 56% at 12% 8%, rgba(125, 211, 252, 0.42), transparent 72%),
        radial-gradient(40% 52% at 88% 12%, rgba(147, 197, 253, 0.38), transparent 72%),
        radial-gradient(46% 60% at 50% 102%, rgba(165, 180, 252, 0.30), transparent 72%),
        radial-gradient(32% 46% at 78% 70%, rgba(56, 189, 248, 0.22), transparent 72%),
        var(--bg-primary);
    animation: auroraShift 16s ease-in-out infinite;
}
[data-theme="light"] body::before,
body[data-theme="light"]::before {
    background:
        radial-gradient(44% 56% at 12% 8%, rgba(125, 211, 252, 0.30), transparent 70%),
        radial-gradient(40% 52% at 88% 12%, rgba(147, 197, 253, 0.26), transparent 70%),
        radial-gradient(46% 60% at 50% 102%, rgba(165, 180, 252, 0.20), transparent 70%),
        var(--bg-primary);
}
[data-theme="vip"] body::before,
body[data-theme="vip"]::before {
    background:
        radial-gradient(46% 58% at 14% 4%, rgba(240, 199, 94, 0.34), transparent 72%),
        radial-gradient(42% 54% at 86% 10%, rgba(240, 199, 94, 0.28), transparent 72%),
        radial-gradient(40% 50% at 50% 100%, rgba(217, 138, 31, 0.20), transparent 72%),
        var(--bg-primary);
}
[data-theme="dark"] body::before,
body[data-theme="dark"]::before {
    background:
        radial-gradient(44% 56% at 12% 8%, rgba(125, 211, 252, 0.42), transparent 72%),
        radial-gradient(40% 52% at 88% 12%, rgba(147, 197, 253, 0.38), transparent 72%),
        radial-gradient(46% 60% at 50% 102%, rgba(165, 180, 252, 0.30), transparent 72%),
        var(--bg-primary);
}

@keyframes auroraShift {
    0%, 100% { transform: translateX(0) translateY(0) scale(1); }
    33% { transform: translateX(-18px) translateY(16px) scale(1.04); }
    66% { transform: translateX(18px) translateY(-16px) scale(0.97); }
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.8; }
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    transition: all 0.3s ease;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-login {
    background: var(--gradient-main);
    color: #fff;
    padding: 11px 22px;
    border-radius: 24px;
    font-size: 15px;
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.4);
}

.nav-login-sub {
    font-style: normal;
    font-weight: 400;
    font-size: 13px;
    opacity: 0.9;
    border-left: 1px solid rgba(255, 255, 255, 0.45);
    padding-left: 8px;
}

.user-menu .btn-sm {
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: var(--blur);
}

.user-menu .btn-sm:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.25);
    transform: translateY(-2px);
}

.theme-toggle-btn {
    width: 50px;
    height: 26px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.guest-quota {
    background: rgba(255, 107, 107, 0.12);
    color: var(--accent);
    border: 1px solid rgba(255, 107, 107, 0.35);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.guest-limit {
    position: fixed;
    inset: 0;
    background: rgba(16, 48, 96, 0.42);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.guest-limit-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(16, 48, 96, 0.28);
    padding: 36px 40px;
    max-width: 460px;
    text-align: center;
    animation: popIn 0.4s ease;
}
.guest-limit-card > i {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 14px;
}
.guest-limit-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
}
.guest-limit-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 22px;
}
.guest-limit-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

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

 .theme-toggle-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--gradient-main);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .theme-toggle-btn::after {
    transform: translateX(24px);
}

.container {
    padding: 120px 40px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-section {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -2px;
    animation: slideInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
    animation: slideInUp 1s ease-out 0.2s both;
}

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

.main-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.image-card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 30px;
    backdrop-filter: var(--blur);
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-main);
    opacity: 0.6;
}

.image-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-colored);
}

.image-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-secondary);
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-container:hover {
    transform: scale(1.02);
}

#randomImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    transition: all 0.5s ease;
}

.image-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    opacity: 0;
    transition: all 0.3s ease;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

.overlay-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(16, 48, 96, 0.55);
    backdrop-filter: var(--blur);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.overlay-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.btn {
    background: var(--gradient-main);
    color: white;
    border: none;
    padding: 18px 28px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: var(--blur);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-colored);
}

.sidebar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 22px;
    right: 22px;
    height: 1px;
    background: var(--gradient-main);
    opacity: 0.45;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title i {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.stat-item {
    text-align: center;
    padding: 20px 16px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    background: var(--bg-card);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.content-list {
    max-height: 200px;
    overflow-y: auto;
}

.content-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-secondary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.content-item:hover {
    background: var(--bg-card);
    transform: translateX(4px);
}

.content-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.content-info {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
}

.remove-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.quality-selector {
    display: flex;
    gap: 8px;
}

.quality-btn {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
}

.quality-btn.active,
.quality-btn:hover {
    background: var(--gradient-main);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.loading {
    display: none;
    text-align: center;
    font-size: 18px;
    color: var(--text-secondary);
    animation: loadingPulse 2s infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.error-msg {
    display: none;
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    animation: shake 0.5s ease-in-out;
}

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

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(234, 242, 255, 0.94);
    backdrop-filter: var(--blur);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    animation: fadeIn 0.3s ease-out;
}
.fullscreen-overlay.dragging { cursor: grabbing; }

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

.fullscreen-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(16, 48, 96, 0.28);
    pointer-events: none;
    transform-origin: center center;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}

.fullscreen-close {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: var(--blur);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 10;
}

.fullscreen-close:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.share-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    width: 90%;
    max-width: 480px;
    background: var(--gradient-card);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1500;
}

.share-panel.active {
    transform: translate(-50%, 0);
}

.share-title {
    text-align: center;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.share-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.share-btn {
    padding: 20px 16px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.share-btn i {
    font-size: 24px;
}

.share-btn.weibo { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.share-btn.weixin { background: linear-gradient(135deg, #4ecdc4, #44b3ab); }
.share-btn.qq { background: linear-gradient(135deg, #3498db, #2980b9); }
.share-btn.link { background: linear-gradient(135deg, #9b59b6, #8e44ad); }

.share-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.cancel-btn {
    width: 100%;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.cancel-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.share-qr {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
    text-align: center;
}
.share-qr #shareQr {
    display: inline-block;
    background: #fff;
    padding: 10px;
    border-radius: 12px;
}
.share-qr #shareQr canvas { display: block; }
.share-qr-tip {
    margin: 10px 0 12px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.notification {
    position: fixed;
    top: 100px;
    right: 40px;
    background: var(--gradient-card);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    z-index: 1000;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0);
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .sidebar {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        display: grid;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    .container {
        padding: 100px 20px 20px;
    }

    .sidebar {
        grid-template-columns: 1fr;
        display: flex;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .image-card {
        padding: 20px;
    }

    .sidebar-card {
        padding: 16px;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-main);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.btn-sm {
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    background: transparent;
    color: var(--text-primary);
}

.btn-sm.ghost {
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: var(--blur);
}

.btn-sm.ghost:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.25);
    transform: translateY(-2px);
}

.user-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    background: var(--gradient-card);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 1100;
}

.user-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-dropdown a:hover {
    background: var(--bg-card);
    color: var(--accent);
}

.user-dropdown a i {
    width: 18px;
    text-align: center;
    color: var(--accent-secondary);
}

.quota-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px dashed var(--border);
    margin-bottom: 6px;
}
.quota-line i {
    width: 18px;
    text-align: center;
    color: var(--accent-secondary);
}
.quota-line b {
    color: var(--accent);
    font-weight: 700;
}

.announcement {
    position: fixed;
    top: 95px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    max-width: 720px;
    width: 90%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient-main);
    color: #fff;
    padding: 10px 20px;
    border-radius: 14px;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    animation: slideInUp 0.5s ease-out;
}

.announcement i {
    font-size: 16px;
}

.expiry-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #d02c2c, #ff5b5b);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 18px rgba(208, 44, 44, 0.4);
    animation: slideInDown 0.4s ease-out;
}
.expiry-banner i { font-size: 16px; }
.expiry-banner b {
    background: #fff;
    color: #d02c2c;
    padding: 1px 8px;
    border-radius: 10px;
}
.expiry-banner .expiry-renew {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 6px;
    padding: 3px 12px;
    background: #fff;
    color: #d02c2c;
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.expiry-banner .expiry-renew:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.35);
}

.expiry-banner .expiry-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.expiry-banner .expiry-close:hover { background: rgba(255, 255, 255, 0.4); }
.expiry-banner { padding-right: 48px; }
body.expiry-visible .navbar { top: 44px; }
body.expiry-visible .announcement { top: 139px; }

.restricted-note {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(255, 91, 91, 0.12);
    border: 1px solid rgba(255, 91, 91, 0.4);
    color: #ff5b5b;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.restricted-note i { font-size: 15px; }

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

.badge {
    background: var(--gradient-main);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.fav-source {
    font-size: 12px;
    color: var(--accent-secondary);
    font-weight: 500;
    margin-bottom: 2px;
}

.fav-dead {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: 10px;
    vertical-align: middle;
}

.fav-time {
    font-size: 11px;
    color: var(--text-muted);
}

.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(16, 48, 96, 0.40);
    backdrop-filter: var(--blur);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.auth-card {
    width: 92%;
    max-width: 400px;
    background: var(--gradient-card);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow-colored);
    animation: slideInUp 0.4s ease-out;
}

.redeem-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    padding: 4px 0;
}
.redeem-title i {
    color: var(--accent);
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--bg-secondary);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: var(--gradient-main);
    color: #fff;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.auth-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

.auth-submit {
    width: 100%;
    margin: 4px 0 8px;
}

.auth-msg {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px 10px;
}

.auth-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--accent-secondary);
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.usage-card {
    max-width: 560px;
}
.usage-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.usage-card-head .auth-hint { margin-bottom: 0; }

.usage-quota {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.uq-item {
    text-align: center;
    padding: 14px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.uq-num {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.uq-num em {
    font-style: normal;
    font-size: 13px;
    font-weight: 500;
    -webkit-text-fill-color: var(--text-muted);
    color: var(--text-muted);
    margin-left: 2px;
}
.uq-label {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.usage-sec {
    margin: 18px 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.usage-sec::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.usage-empty {
    padding: 18px 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: 12px;
}
.usage-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ul-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 13px;
}
.ul-label {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}
.ul-note {
    color: var(--text-muted);
    font-size: 12px;
}
.ul-delta, .ul-right {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 26px;
    text-align: right;
}
.usage-more {
    width: 100%;
    margin-top: 8px;
    font-size: 13px;
    padding: 11px;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all .2s ease;
}
.usage-more:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.usage-tip {
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    color: var(--text-muted);
    font-size: 12px;
}
.auth-error {
    display: none;
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 71, 87, .12);
    border: 1px solid rgba(255, 71, 87, .45);
    color: #ff6b81;
    font-size: 13.5px;
    line-height: 1.5;
    word-break: break-all;
}
.auth-error.shake { animation: authErrShake .35s ease; }
@keyframes authErrShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
