:root {
    --bg: #f5f5fa;
    --bg-secondary: rgba(0, 0, 0, 0.03);
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.85);
    --text: #1a1a2e;
    --text-muted: rgba(26, 26, 46, 0.72);
    --text-dim: rgba(26, 26, 46, 0.45);
    --accent: #7c5cfc;
    --accent-light: #6c4ce6;
    --accent-glow: rgba(124, 92, 252, 0.12);
    --accent-glow-strong: rgba(124, 92, 252, 0.25);
    --cyan: #22d3ee;
    --green: #4ade80;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(124, 92, 252, 0.4);
    --radius: 22px;
    --radius-sm: 14px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', 'Noto Sans SC', 'Noto Sans JP', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-bg-hover: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-blur: blur(20px) saturate(1.5);
    --glass-shadow:
        0 8px 32px rgba(124, 92, 252, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}

:root.dark {
    --bg: #0a0a1f;
    --bg-secondary: rgba(255, 255, 255, 0.04);
    --bg-card: rgba(255, 255, 255, 0.06);
    --bg-card-hover: rgba(255, 255, 255, 0.1);
    --text: #f0f0fa;
    --text-muted: rgba(255, 255, 255, 0.72);
    --text-dim: rgba(255, 255, 255, 0.42);
    --accent-light: #a78bfa;
    --accent-glow: rgba(124, 92, 252, 0.18);
    --accent-glow-strong: rgba(124, 92, 252, 0.35);
    --border: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(124, 92, 252, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-bg-hover: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-blur: blur(20px) saturate(1.8);
    --glass-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent), var(--cyan));
    border-radius: 10px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-light), var(--cyan));
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg);
}

::selection {
    background: var(--accent-glow-strong);
    color: var(--accent);
}

.welcome-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background:
        radial-gradient(ellipse 60% 50% at 30% 20%, rgba(124, 92, 252, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 70% 60% at 80% 90%, rgba(34, 211, 238, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 70% 30%, rgba(124, 92, 252, 0.14) 0%, transparent 50%),
        linear-gradient(135deg, #f6f6fb 0%, #eef0ff 50%, #e8f4f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.welcome-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 100% 80% at 50% 50%, transparent 55%, rgba(124, 92, 252, 0.06) 100%);
    z-index: 1;
}

.welcome-screen .gradient-orb {
    opacity: 0.75;
    filter: blur(90px) saturate(1.6);
}

.welcome-screen .orb-1 {
    width: 520px;
    height: 520px;
    top: -100px;
    right: -60px;
    background: var(--accent);
}

.welcome-screen .orb-2 {
    width: 480px;
    height: 480px;
    bottom: -80px;
    left: -60px;
    background: var(--cyan);
}

.welcome-screen .grid-overlay {
    opacity: 0.5;
    background-image:
        linear-gradient(rgba(26, 26, 46, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 26, 46, 0.05) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 80%);
}

.welcome-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.welcome-rain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.35;
    z-index: 0;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 85%);
}

.welcome-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid rgba(26, 26, 46, 0.18);
    transform: translate(-50%, -50%);
}

.ring-1 {
    width: 220px;
    height: 220px;
    border-width: 1.5px;
    animation: ring-pulse 4.5s ease-in-out infinite;
}

.ring-2 {
    width: 340px;
    height: 340px;
    border-color: var(--cyan);
    opacity: 0.12;
    animation: ring-pulse 4.5s ease-in-out infinite 0.7s;
}

.ring-3 {
    width: 480px;
    height: 480px;
    opacity: 0.08;
    border-style: dashed;
    animation: ring-pulse 4.5s ease-in-out infinite 1.4s;
}

@keyframes ring-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.18; }
    50% { transform: translate(-50%, -50%) scale(1.12); opacity: 0.04; }
}

.welcome-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 56px 48px 48px;
    animation: welcome-in 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.welcome-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.72) 0%,
        rgba(255, 255, 255, 0.55) 45%,
        rgba(255, 255, 255, 0.65) 100%);
    backdrop-filter: blur(32px) saturate(1.8);
    -webkit-backdrop-filter: blur(32px) saturate(1.8);
    border-radius: 36px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 28px 80px rgba(124, 92, 252, 0.12),
        0 10px 28px rgba(124, 92, 252, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.9),
        inset 0 -1px 1px rgba(0, 0, 0, 0.04),
        inset 0 0 60px rgba(255, 255, 255, 0.4);
    z-index: -1;
    pointer-events: none;
}

.welcome-content::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 8%;
    right: 8%;
    height: 45%;
    background: radial-gradient(ellipse 80% 100% at 50% 0%,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 80%);
    border-radius: 36px 36px 50% 50% / 100% 100% 50% 50%;
    filter: blur(2px);
    z-index: -1;
    pointer-events: none;
}

@keyframes welcome-in {
    from { opacity: 0; transform: translateY(24px) scale(0.98); filter: blur(4px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.welcome-logo {
    width: 160px;
    height: 160px;
    margin: 0 auto 28px;
    position: relative;
    display: grid;
    place-items: center;
}

.welcome-logo::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent), var(--cyan), var(--accent-light), var(--accent));
    opacity: 0.45;
    filter: blur(2px);
    animation: rotate 8s linear infinite;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 24px rgba(124, 92, 252, 0.25);
}

.welcome-logo::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.6) 55%, transparent 75%);
    z-index: 1;
}

.welcome-logo-svg {
    width: 120px;
    height: 120px;
    position: relative;
    z-index: 2;
    display: block;
    filter: drop-shadow(0 8px 24px var(--accent-glow-strong));
    animation: logo-float 4s ease-in-out infinite;
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1.5deg); }
}

.logo-orbit {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    animation: rotate 7s linear infinite;
    pointer-events: none;
    z-index: 3;
}

.orbit-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent), 0 0 4px var(--accent);
}

.orbit-dot:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent), 0 0 4px var(--accent);
}

.orbit-dot:nth-child(2) {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: var(--cyan);
    box-shadow: 0 0 14px var(--cyan), 0 0 4px var(--cyan);
}

.orbit-dot:nth-child(3) {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green);
    box-shadow: 0 0 14px var(--green), 0 0 4px var(--green);
}

.welcome-loader {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px auto 32px;
    width: 240px;
    justify-content: center;
}

.loader-bar {
    flex: 1;
    height: 6px;
    background: rgba(26, 26, 46, 0.08);
    backdrop-filter: blur(6px) saturate(1.4);
    -webkit-backdrop-filter: blur(6px) saturate(1.4);
    border: 1px solid rgba(26, 26, 46, 0.1);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.06),
        inset 0 -1px 0 rgba(255, 255, 255, 0.5);
}

.loader-bar span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    border-radius: 100px;
    transition: width 0.05s ease-out;
    position: relative;
    box-shadow: 0 0 14px rgba(124, 92, 252, 0.7);
}

.loader-bar span::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    background-size: 60px 100%;
    background-repeat: no-repeat;
    animation: loader-shimmer 1.4s linear infinite;
}

@keyframes loader-shimmer {
    0% { background-position: -60px 0; }
    100% { background-position: 240px 0; }
}

.loader-text {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: rgba(26, 26, 46, 0.6);
    min-width: 36px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

.welcome-title {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #1a1a2e 0%, #7c5cfc 45%, var(--cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
    filter: drop-shadow(0 4px 24px rgba(124, 92, 252, 0.25));
}

.welcome-text {
    font-size: 1.05rem;
    color: rgba(26, 26, 46, 0.72);
    margin-bottom: 8px;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.01em;
    animation: text-reveal 1.2s ease-out 0.3s both;
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.4);
}

@keyframes text-reveal {
    0% { opacity: 0; transform: translateY(8px); filter: blur(3px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.welcome-enter {
    padding: 14px 38px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: linear-gradient(180deg,
        rgba(124, 92, 252, 0.55) 0%,
        rgba(108, 76, 230, 0.45) 100%);
    backdrop-filter: blur(14px) saturate(1.6);
    -webkit-backdrop-filter: blur(14px) saturate(1.6);
    color: #fff;
    box-shadow:
        0 8px 28px rgba(124, 92, 252, 0.28),
        0 2px 8px rgba(26, 26, 46, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.04em;
}

.welcome-enter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.welcome-enter.ready::before {
    animation: btn-sheen 2.4s ease-in-out infinite;
}

@keyframes btn-sheen {
    0%, 20% { left: -120%; }
    55%, 100% { left: 140%; }
}

.welcome-enter:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 40px rgba(124, 92, 252, 0.36),
        0 4px 12px rgba(26, 26, 46, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.welcome-enter:hover::before {
    left: 140%;
}

.welcome-enter:active {
    transform: translateY(0) scale(0.98);
}

.welcome-enter.disabled {
    opacity: 0.45;
    pointer-events: none;
    filter: saturate(0.6);
}

.welcome-enter.ready {
    animation: enter-pulse 1.8s ease-in-out infinite;
}

@keyframes enter-pulse {
    0%, 100% { box-shadow: 0 8px 28px rgba(124, 92, 252, 0.28), 0 2px 8px rgba(26, 26, 46, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
    50% { box-shadow: 0 10px 44px rgba(124, 92, 252, 0.4), 0 0 0 8px rgba(124, 92, 252, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
}

.mouse-trail {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9997;
    overflow: hidden;
}

.trail-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    pointer-events: none;
    animation: trail-fade 0.6s ease-out forwards;
}

@keyframes trail-fade {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.2) translate(var(--tx), var(--ty)); }
}

.egg-tracker {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 8px 16px 8px 8px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color var(--transition), box-shadow var(--transition);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.egg-tracker::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.06), rgba(34, 211, 238, 0.06));
    pointer-events: none;
    opacity: 0.6;
}

.egg-tracker:hover {
    border-color: var(--border-hover);
    box-shadow:
        0 12px 32px rgba(124, 92, 252, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.egg-tracker.visible {
    opacity: 1;
    transform: translateY(0);
}

.egg-label {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    color: #fff;
    padding: 4px 10px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px var(--accent-glow-strong);
}

.egg-count {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.egg-total {
    position: relative;
    z-index: 1;
    color: var(--text-dim);
    font-size: 0.8rem;
}

.egg-count.bump {
    transform: scale(1.4);
}

.egg-complete {
    animation: egg-celebrate 0.6s ease-out;
}

@keyframes egg-celebrate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15) rotate(2deg); }
}

.name-pulse {
    animation: name-pulse 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes name-pulse {
    0%, 100% { transform: scale(1); filter: none; }
    50% {
        transform: scale(1.18);
        filter: drop-shadow(0 0 14px var(--accent-glow-strong));
    }
}

.badge-pop {
    animation: badge-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badge-pop {
    0%, 100% { transform: scale(1) rotate(0); }
    35% { transform: scale(1.18) rotate(-4deg); }
    70% { transform: scale(0.94) rotate(3deg); }
}

.thanks-glow {
    animation: thanks-glow 1s ease-out;
}

@keyframes thanks-glow {
    0%, 100% { text-shadow: none; color: inherit; }
    50% {
        text-shadow: 0 0 14px var(--accent);
        color: var(--accent);
    }
}

.title-bump {
    animation: title-bump 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes title-bump {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-7px); }
    65% { transform: translateY(3px); }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse 50% 40% at 20% 10%, rgba(124, 92, 252, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 85%, rgba(34, 211, 238, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 40% 30% at 75% 25%, rgba(167, 139, 250, 0.12) 0%, transparent 50%),
        linear-gradient(135deg, #f5f5fa 0%, #ece8fa 50%, #e0f7fb 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

:root.dark body {
    background:
        radial-gradient(ellipse 50% 40% at 20% 10%, rgba(124, 92, 252, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 85%, rgba(34, 211, 238, 0.16) 0%, transparent 55%),
        radial-gradient(ellipse 40% 30% at 75% 25%, rgba(167, 139, 250, 0.14) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a1f 0%, #0d0d28 50%, #050a18 100%);
}

:root.dark .navbar.scrolled {
    background: rgba(10, 10, 31, 0.55);
}

:root.dark .timeline-dot {
    border-color: rgba(255, 255, 255, 0.4);
}

:root.dark .card-header {
    background: rgba(0, 0, 0, 0.15);
}

:root.dark .welcome-screen {
    background:
        radial-gradient(ellipse 60% 50% at 30% 20%, #2a1a5e 0%, transparent 55%),
        radial-gradient(ellipse 70% 60% at 80% 90%, #0d3a4a 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 70% 30%, #3d1f7a 0%, transparent 50%),
        linear-gradient(135deg, #1a1033 0%, #0f1530 50%, #051a26 100%);
}

:root.dark .welcome-screen::after {
    background: radial-gradient(ellipse 100% 80% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
}

:root.dark .welcome-screen .grid-overlay {
    opacity: 0.4;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

:root.dark .ring {
    border-color: rgba(255, 255, 255, 0.25);
}

:root.dark .welcome-content::before {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.06) 45%,
        rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(32px) saturate(2) brightness(1.1);
    -webkit-backdrop-filter: blur(32px) saturate(2) brightness(1.1);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.35),
        0 10px 28px rgba(124, 92, 252, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        inset 0 -1px 1px rgba(0, 0, 0, 0.15),
        inset 0 0 60px rgba(255, 255, 255, 0.03);
}

:root.dark .welcome-logo::after {
    background: radial-gradient(circle at center, rgba(15, 21, 48, 0.4) 55%, transparent 75%);
}

:root.dark .loader-bar {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.2),
        inset 0 -1px 0 rgba(255, 255, 255, 0.15);
}

:root.dark .welcome-title {
    background: linear-gradient(135deg, #ffffff 0%, #d8ccff 40%, var(--cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 24px rgba(124, 92, 252, 0.4));
}

:root.dark .welcome-text {
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

:root.dark .loader-text {
    color: rgba(255, 255, 255, 0.65);
}

:root.dark .welcome-tag {
    color: rgba(255, 255, 255, 0.7);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 50%;
    background: radial-gradient(ellipse 70% 100% at 50% 0%,
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 80%);
    border-radius: 100% 100% 50% 50% / 100% 100% 50% 50%;
    pointer-events: none;
    z-index: 0;
}

.glass > * {
    position: relative;
    z-index: 1;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition), background var(--transition), color var(--transition);
    flex-shrink: 0;
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.06);
    background: var(--glass-bg-hover);
    color: var(--accent-light);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle .theme-icon-dark {
    display: none;
}

:root.dark .theme-toggle .theme-icon-dark {
    display: block;
}

:root.dark .theme-toggle .theme-icon-light {
    display: none;
}

#themeToggleWelcome {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 5;
    width: 38px;
    height: 38px;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 32px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 14px 0;
    transition: all var(--transition);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    border-bottom-color: var(--glass-border);
    padding: 12px 0;
    box-shadow: 0 8px 28px rgba(124, 92, 252, 0.1);
}

.nav-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.nav-logo .dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    justify-content: center;
}

.nav-links > a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
    position: relative;
}

.nav-links > a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: width var(--transition);
}

.nav-links > a:hover {
    color: var(--text);
}

.nav-links > a:hover::after {
    width: 100%;
}

.lang-switch {
    display: flex;
    gap: 2px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all var(--transition);
}

.lang-btn:hover {
    color: var(--text);
}

.lang-btn.active {
    background: var(--accent);
    color: #fff;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu span {
    width: 26px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

.nav-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px) saturate(1.4);
    opacity: 0.45;
    animation: float 14s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -150px;
    right: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--cyan);
    bottom: -100px;
    left: -100px;
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -40px) scale(1.05); }
    66% { transform: translate(-30px, 25px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 750px;
    padding: 0 32px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    padding: 7px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    box-shadow: var(--glass-shadow);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(3rem, 9vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 20px;
}

.hero-title .greeting {
    display: block;
    font-size: 0.35em;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.hero-title .name {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 6s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    color: var(--text-muted);
    margin-bottom: 22px;
    font-weight: 500;
}

.hero-desc {
    font-size: 1.08rem;
    color: var(--text-dim);
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #6c4ce6);
    color: #fff;
    box-shadow: 0 6px 24px var(--accent-glow-strong);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 36px var(--accent-glow-strong), 0 0 0 4px var(--accent-glow);
}

.btn-ghost {
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--text);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    font-family: var(--font);
    box-shadow: var(--glass-shadow);
}

.btn-ghost:hover {
    border-color: var(--accent-light);
    color: var(--accent-light);
    transform: translateY(-2px);
    background: var(--glass-bg-hover);
    box-shadow:
        0 12px 36px rgba(124, 92, 252, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hero-tech {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-tech span {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 100px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.hero-tech span::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0.6;
    transition: opacity var(--transition);
}

.hero-tech span:hover {
    color: #fff;
    transform: translateY(-2px);
    background: var(--glass-bg-hover);
    box-shadow:
        0 8px 24px rgba(124, 92, 252, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hero-tech span:hover::before {
    opacity: 1;
}

.hero-tech span:nth-child(1)::before { background: var(--accent); }
.hero-tech span:nth-child(2)::before { background: var(--cyan); }
.hero-tech span:nth-child(3)::before { background: var(--green); }
.hero-tech span:nth-child(4)::before { background: #f59e0b; }
.hero-tech span:nth-child(5)::before { background: #f472b6; }

.float-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.f-dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    animation: float-y 10s ease-in-out infinite;
}

.f-1 { width: 14px; height: 14px; left: 10%; top: 30%; background: var(--accent); animation-delay: -1s; }
.f-2 { width: 10px; height: 10px; left: 82%; top: 20%; background: var(--cyan); animation-delay: -3s; }
.f-3 { width: 8px;  height: 8px;  left: 20%; top: 70%; background: var(--green); animation-delay: -5s; }
.f-4 { width: 16px; height: 16px; left: 90%; top: 60%; background: var(--accent-light); animation-delay: -2s; }
.f-5 { width: 6px;  height: 6px;  left: 45%; top: 18%; background: #f472b6; animation-delay: -7s; }
.f-6 { width: 12px; height: 12px; left: 65%; top: 78%; background: var(--cyan); animation-delay: -4s; }

@keyframes float-y {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

.scroll-indicator {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.mouse {
    width: 28px;
    height: 46px;
    border: 2px solid var(--accent);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
    box-shadow: 0 0 16px var(--accent-glow);
    transition: all var(--transition);
}

.scroll-indicator:hover .mouse {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
    transform: scale(1.05);
}

.wheel {
    width: 4px;
    height: 8px;
    background: linear-gradient(180deg, var(--accent), var(--cyan));
    border-radius: 2px;
    animation: scroll-down 2s ease-in-out infinite;
}

@keyframes scroll-down {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(14px); opacity: 0; }
}

.about, .skills, .projects, .timeline, .contact {
    padding: 140px 0;
    position: relative;
}

.about::before, .projects::before, .timeline::before, .contact::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.55;
}
.about::before {
    background:
        radial-gradient(ellipse 55% 60% at 10% 10%, rgba(124, 92, 252, 0.08), transparent 60%),
        radial-gradient(ellipse 55% 60% at 90% 90%, rgba(34, 211, 238, 0.08), transparent 60%);
}
.projects::before {
    background:
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(124, 92, 252, 0.09), transparent 60%),
        radial-gradient(ellipse 60% 50% at 10% 80%, rgba(34, 211, 238, 0.08), transparent 60%);
}
.timeline::before {
    background:
        radial-gradient(ellipse 60% 45% at 12% 50%, rgba(34, 211, 238, 0.08), transparent 60%),
        radial-gradient(ellipse 60% 45% at 88% 50%, rgba(124, 92, 252, 0.09), transparent 60%);
}
.contact::before {
    background:
        radial-gradient(ellipse 55% 50% at 50% 0%, rgba(124, 92, 252, 0.10), transparent 60%);
}

.about > .container, .projects > .container, .timeline > .container, .contact > .container {
    position: relative;
    z-index: 1;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 64px;
}

.section-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 700;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    letter-spacing: 0.05em;
    box-shadow: var(--glass-shadow);
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 60%, var(--cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent 60%);
    border-radius: 2px;
    position: relative;
}

.section-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: -2px;
    width: 24px;
    height: 6px;
    background: var(--accent);
    border-radius: 4px;
    box-shadow: 0 0 8px var(--accent);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 22px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 36px;
}

.stat {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    box-shadow: var(--glass-shadow);
    transition: all var(--transition);
}

.stat:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow:
        0 12px 32px rgba(124, 92, 252, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.stat-num {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--accent);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.about-visual {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.about-logo {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent), var(--cyan), var(--accent));
    opacity: 0.3;
    animation: rotate 8s linear infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.logo-svg {
    width: 120px;
    height: 120px;
    position: relative;
    z-index: 1;
}

.about-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    width: 100%;
    transition: all var(--transition);
    box-shadow: var(--glass-shadow);
}

.about-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow:
        0 16px 48px rgba(124, 92, 252, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(180deg, rgba(124, 92, 252, 0.08), rgba(255, 255, 255, 0.02));
}

.card-dots {
    display: flex;
    gap: 7px;
}

.card-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.card-dots span:nth-child(1) { background: #ff5f57; }
.card-dots span:nth-child(2) { background: #febc2e; }
.card-dots span:nth-child(3) { background: #28c840; }

.card-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-left: auto;
}

.card-body {
    padding: 24px;
    overflow-x: auto;
}

.card-body pre {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.7;
}

.c-key { color: #a626a4; }
.c-fn { color: #4078f2; }
.c-val { color: #d19a66; }
.c-str { color: #50a14f; }
.c-num { color: #c18401; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.skill-category {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all var(--transition);
    box-shadow: var(--glass-shadow);
}

.skill-category:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow:
        0 16px 48px rgba(124, 92, 252, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.skill-cat-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--accent);
}

.skill-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text);
    padding: 7px 14px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    transition: all var(--transition);
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    background: var(--glass-bg-hover);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.project-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 9px 22px;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    transition: all var(--transition);
    box-shadow: var(--glass-shadow);
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--glass-bg-hover);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent), #6c4ce6);
    border-color: transparent;
    color: #fff;
    box-shadow:
        0 6px 20px var(--accent-glow-strong),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 50%;
    background: radial-gradient(ellipse 70% 100% at 50% 0%,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 80%);
    border-radius: 100% 100% 50% 50% / 100% 100% 50% 50%;
    pointer-events: none;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    background: var(--glass-bg-hover);
    box-shadow:
        0 20px 60px rgba(124, 92, 252, 0.22),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card.hidden {
    display: none;
}

.project-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card:hover .project-icon {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    color: #fff;
    transform: scale(1.08) rotate(-6deg);
    box-shadow: 0 8px 20px var(--accent-glow-strong);
}

.project-icon svg {
    transition: transform 0.4s ease;
}

.project-card:hover .project-icon svg {
    transform: rotate(6deg);
}

.project-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 18px;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.project-tags span {
    font-size: 0.74rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    padding: 5px 12px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}

.project-tags span:hover {
    color: var(--accent);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.project-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    padding: 9px 18px;
    border-radius: 100px;
    transition: all var(--transition);
    box-shadow: 0 4px 14px var(--accent-glow-strong);
}

.project-links a::after {
    content: '';
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-right: 2px;
}

.project-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px var(--accent-glow-strong), 0 2px 8px rgba(0, 0, 0, 0.08);
    filter: brightness(1.05);
}

.timeline-list {
    position: relative;
    padding-left: 32px;
}

.timeline-list::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--cyan), var(--border));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 32px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.18), 0 0 16px var(--accent);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.timeline-content {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px 28px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent), var(--cyan));
    border-radius: 3px;
    transform: scaleY(0.5);
    transform-origin: top;
    transition: transform 0.4s ease;
}

.timeline-content:hover {
    transform: translateX(6px);
    background: var(--glass-bg-hover);
    box-shadow:
        0 16px 48px rgba(124, 92, 252, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.timeline-content:hover::before {
    transform: scaleY(1);
}

.timeline-version {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.timeline-date {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-dim);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    margin-top: 8px;
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-top: 10px;
}

.contact-content {
    text-align: center;
}

.contact-intro {
    font-size: 1.12rem;
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    max-width: 820px;
    margin: 0 auto;
}

.contact-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all var(--transition);
    cursor: pointer;
    box-shadow: var(--glass-shadow);
}

.contact-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    background: var(--glass-bg-hover);
    box-shadow:
        0 20px 60px rgba(124, 92, 252, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.contact-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
    transition: all var(--transition);
}

.contact-card:hover .contact-icon {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    color: #fff;
    animation: wobble 0.6s ease-out;
}

@keyframes wobble {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-8deg); }
    50% { transform: rotate(8deg); }
    75% { transform: rotate(-4deg); }
}

.contact-text h4 {
    font-size: 1.02rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.contact-text p {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.footer {
    padding: 36px 0;
    border-top: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0%, rgba(124, 92, 252, 0.04) 100%);
}

.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.thanks-cloud {
    font-size: 0.8rem !important;
    color: var(--text-dim) !important;
}

.thanks-cloud a {
    color: var(--accent);
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.thanks-cloud a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
    opacity: 0.7;
}

.thanks-cloud a:hover {
    opacity: 0.9;
}

.thanks-cloud a:hover::after {
    transform: scaleX(1);
}

.back-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    padding: 9px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    box-shadow: var(--glass-shadow);
    transition: all var(--transition);
}

.back-top:hover {
    color: var(--accent);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow:
        0 10px 28px var(--accent-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-visual {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-tools {
        gap: 8px;
    }

    .mobile-menu {
        display: flex;
    }

    .nav-links.mobile-open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        flex-direction: column;
        padding: 24px 32px;
        gap: 20px;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 16px 36px rgba(124, 92, 252, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .nav-links.mobile-open a {
        font-size: 1rem;
    }

    .mobile-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    .mobile-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .about, .skills, .projects, .timeline, .contact {
        padding: 100px 0;
    }

    .about-stats {
        gap: 24px;
    }

    .footer .container {
        justify-content: center;
        text-align: center;
    }

    .section-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .section-line {
        display: none;
    }
}

.btn, .btn-ghost, .welcome-enter, .filter-btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-anim 0.6s ease-out;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 1;
}

.btn-ghost .ripple, .filter-btn .ripple {
    background: var(--accent-glow-strong);
}

@keyframes ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.project-card {
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition);
    transform-style: preserve-3d;
}

.contact-card {
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition);
}

.contact-card:hover {
    transform: translateY(-4px);
}

.hero-title .name {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

.hero-desc {
    position: relative;
}

.typing-cursor::after {
    content: '|';
    display: inline-block;
    margin-left: 2px;
    animation: cursor-blink 1s step-end infinite;
    color: var(--accent);
    font-weight: 300;
}

@keyframes cursor-blink {
    50% { opacity: 0; }
}

.confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10000;
}

.particles-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.click-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: click-burst 0.8s ease-out forwards;
}

@keyframes click-burst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: var(--burst-end) scale(0);
    }
}

.logo-wiggle {
    animation: wiggle 0.6s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-12deg); }
    40% { transform: rotate(10deg); }
    60% { transform: rotate(-6deg); }
    80% { transform: rotate(4deg); }
}

.about-visual {
    perspective: 1200px;
}

.about-card {
    transition: transform 0.15s ease-out, box-shadow var(--transition);
    transform-style: preserve-3d;
    will-change: transform;
}

.about-card:hover {
    box-shadow: 0 20px 60px rgba(124, 92, 252, 0.15), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.stat {
    transition: transform var(--transition);
}

.stat:hover {
    transform: translateY(-4px) scale(1.03);
}

.stat-num {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timeline-dot::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0;
    animation: dot-pulse 2.5s ease-out infinite;
}

.timeline-item:nth-child(3n) .timeline-dot::after { animation-delay: 0.2s; }
.timeline-item:nth-child(3n+2) .timeline-dot::after { animation-delay: 0.5s; }

@keyframes dot-pulse {
    0% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 0; transform: scale(2.4); }
}

.timeline-version {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    font-weight: 600;
    color: var(--accent-light);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.surprise-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(124, 92, 252, 0.12), transparent 70%);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.surprise-overlay.show {
    opacity: 1;
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

.glow-pulse {
    animation: glow-pulse 3.4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(124, 92, 252, 0.0)); }
    50% { filter: drop-shadow(0 0 16px rgba(124, 92, 252, 0.35)); }
}

.float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shimmer 3s ease-in-out infinite;
    mix-blend-mode: screen;
    pointer-events: none;
}

@keyframes shimmer {
    60% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

.nav-auth {
    display: flex;
    align-items: center;
}

.nav-auth-btn {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 100px;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 6px 16px var(--accent-glow-strong);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px var(--accent-glow-strong), 0 2px 6px rgba(0, 0, 0, 0.06);
    filter: brightness(1.04);
}

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

.nav-auth-btn.nav-auth-user {
    background: var(--glass-bg);
    color: var(--text);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
}

.nav-auth-btn.nav-auth-user:hover {
    color: var(--accent);
    border-color: var(--border-hover);
}

.nav-auth-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 9996;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.open {
    display: flex;
    animation: modal-fade 0.25s ease;
}

@keyframes modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 20, 0.5);
    backdrop-filter: blur(8px) saturate(1.2);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    padding: 28px;
    animation: modal-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--glass-bg);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 2;
}

.modal-close:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: rotate(90deg);
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
    position: relative;
}

.auth-logo::before {
    content: '';
    position: absolute;
    inset: -6px;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.22), transparent 60%);
    filter: blur(6px);
    z-index: 0;
    animation: glow-pulse 3.4s ease-in-out infinite;
}

.auth-logo svg {
    position: relative;
    z-index: 1;
    animation: float-slow 8s ease-in-out infinite;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: var(--glass-bg);
    padding: 4px;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    margin-bottom: 22px;
    box-shadow: var(--glass-shadow);
}

.auth-tab {
    background: none;
    border: none;
    padding: 8px 10px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font);
    transition: all 0.25s ease;
    position: relative;
}

.auth-tab:hover {
    color: var(--text);
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    color: #fff;
    box-shadow: 0 6px 18px var(--accent-glow-strong);
}

.auth-panels {
    min-height: 0;
}

.auth-panel {
    display: none;
    animation: panel-in 0.35s ease both;
}

.auth-panel-active {
    display: block;
}

@keyframes panel-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.field > span {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.field input {
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.92rem;
    outline: none;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: all 0.2s ease;
}

.field input::placeholder {
    color: var(--text-dim);
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: var(--glass-bg-hover);
}

.field input:autofill,
.field input:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--glass-bg-hover) inset, 0 0 0 4px var(--accent-glow);
    caret-color: var(--text);
    transition: background-color 0s 9999999s ease;
}

.auth-hint {
    font-size: 0.76rem;
    color: var(--text-dim);
    margin-top: 2px;
    line-height: 1.6;
}

.auth-error {
    min-height: 0;
    font-size: 0.8rem;
    color: #e0566b;
    background: rgba(224, 86, 107, 0.08);
    border: 1px solid rgba(224, 86, 107, 0.25);
    border-radius: 10px;
    padding: 8px 10px;
    line-height: 1.5;
    display: none;
    animation: shake 0.4s ease;
}

.auth-error.show {
    display: block;
}

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

.auth-submit {
    width: 100%;
    justify-content: center;
    margin-top: 6px;
}

.modal-card.admin-card {
    width: min(880px, 100%);
    max-height: calc(100vh - 48px);
    padding: 28px 28px 22px;
}

.admin-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.admin-kicker {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0.9;
}

.admin-title {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 4px;
    background: linear-gradient(135deg, var(--text), var(--accent) 55%, var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-head-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-btn-ghost {
    padding: 9px 14px;
    border-radius: 12px;
    font-size: 0.82rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.admin-stat {
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 18px 18px 16px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.25s ease;
}

.admin-stat::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow), transparent 65%);
    opacity: 0.7;
    pointer-events: none;
}

.admin-stat:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow:
        0 16px 40px rgba(124, 92, 252, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.admin-stat-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.admin-stat-value {
    font-family: var(--font-mono);
    font-size: 2.1rem;
    font-weight: 800;
    margin-top: 8px;
    line-height: 1;
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
    font-variant-numeric: tabular-nums;
}

.admin-stat-foot {
    margin-top: 8px;
    font-size: 0.74rem;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
}

.admin-stat-primary::before { background: radial-gradient(circle, rgba(124, 92, 252, 0.28), transparent 65%); }
.admin-stat-cyan::before { background: radial-gradient(circle, rgba(34, 211, 238, 0.26), transparent 65%); }
.admin-stat-green::before { background: radial-gradient(circle, rgba(74, 222, 128, 0.26), transparent 65%); }

.admin-stat-cyan .admin-stat-value {
    background: linear-gradient(135deg, var(--text), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-stat-green .admin-stat-value {
    background: linear-gradient(135deg, var(--text), #4ade80);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-sub {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--glass-shadow);
    margin-bottom: 14px;
    overflow: hidden;
}

.admin-sub-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    color: var(--text);
}

.admin-table-wrap {
    max-height: 300px;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(124, 92, 252, 0.02), transparent 40%);
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
}

.admin-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.admin-table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--glass-bg-hover);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.admin-table th:first-child { border-top-left-radius: 12px; }
.admin-table th:last-child { border-top-right-radius: 12px; }

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-table tbody tr {
    transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
    background: var(--accent-glow);
}

.admin-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 22px 12px !important;
    font-size: 0.88rem;
}

.admin-online-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.admin-online-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(120, 120, 140, 0.5);
    box-shadow: 0 0 0 3px rgba(120, 120, 140, 0.15);
    flex-shrink: 0;
}

.admin-online-dot.online::before {
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2), 0 0 12px rgba(74, 222, 128, 0.55);
    animation: pulse 1.6s ease-in-out infinite;
}

.admin-row-delete {
    border: 1px solid rgba(224, 86, 107, 0.35);
    background: rgba(224, 86, 107, 0.08);
    color: #e0566b;
    border-radius: 10px;
    padding: 5px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    opacity: 0.5;
    pointer-events: none;
    transition: all 0.2s ease;
}

.admin-row-delete.armed {
    opacity: 1;
    pointer-events: auto;
}

.admin-row-delete.armed:hover {
    background: #e0566b;
    color: #fff;
    border-color: #e0566b;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(224, 86, 107, 0.3);
}

.admin-safe {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-track {
    width: 40px;
    height: 22px;
    border-radius: 100px;
    background: rgba(120, 120, 140, 0.25);
    display: inline-block;
    position: relative;
    transition: background 0.25s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle input:checked + .toggle-track {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    box-shadow: 0 0 0 3px var(--accent-glow), inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.toggle input:checked + .toggle-track .toggle-knob {
    transform: translateX(18px);
}

.admin-safe-hint {
    font-size: 0.76rem;
    color: var(--text-dim);
}

@media (max-width: 880px) {
    .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .modal-card.admin-card {
        padding: 22px 18px 18px;
    }
    .admin-head {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-table {
        font-size: 0.78rem;
    }
    .admin-table th, .admin-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 640px) {
    .nav-container {
        padding: 0 18px;
        gap: 8px;
    }
    .nav-lang-switch {
        display: none;
    }
    .nav-auth-btn {
        padding: 6px 12px;
        font-size: 0.74rem;
    }
    .theme-toggle {
        width: 32px;
        height: 32px;
    }
    .nav-auth-btn .nav-auth-text {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .nav-auth-btn .nav-auth-avatar {
        width: 16px;
        height: 16px;
        font-size: 0.55rem;
    }
    .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .admin-stat-value {
        font-size: 1.7rem;
    }
    .auth-tabs {
        gap: 3px;
        padding: 3px;
    }
    .auth-tab {
        font-size: 0.75rem;
        padding: 7px 6px;
    }
    .modal-card {
        padding: 22px 18px;
        border-radius: 22px;
    }
    .field input {
        height: 40px;
    }
}
