/* Link normalization: remove default underline and visited purple color */
a, .menu-item, .footer-nav a {
    text-decoration: none;
    color: inherit;
}
a:visited, .menu-item:visited, .footer-nav a:visited {
    color: inherit;
}
a:hover, .menu-item:hover, .footer-nav a:hover {
    text-decoration: none;
}


/* Extracted from index.html <style> */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Unbounded', sans-serif;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* Global image responsiveness: never overflow containers and keep natural aspect ratio */
img { max-width: 100%; height: auto; }

body {
    background-color: #000000;
    color: #ffffff;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    text-align: center;
    min-width: 100%;
}

.intro {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    animation: fadeOut 2s forwards 3s;
    cursor: pointer;
}

.intro.clicked { animation: fadeOut 1s forwards; }

.king-symbol {
    position: relative;
    display: inline-block;
    font-size: 120px; /* slightly larger crown */
    color: #ffffff; /* pure monochrome white */
    opacity: 0;
    /* Only intro appear/disappear for clean look */
    animation: appear 1s forwards 1s, symbolDisappear 2s ease-out forwards 2s;
    /* Subtle white glow for depth without color */
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.18), 0 0 18px rgba(255, 255, 255, 0.12);
    will-change: opacity, transform, filter;
}

/* Decorative sparkle removed for cleaner monochrome style */

/* Shimmer removed for strictly monochrome styling */

@keyframes sparklePulse {
    0%, 100% { transform: scale(1); opacity: 0.75; }
    50% { transform: scale(1.25); opacity: 1; }
}

@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
/* Static fade-out: no position shift */
@keyframes symbolDisappear { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(0); } }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }

.menu-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    background: rgba(0, 0, 0, 0.9);
    padding: 8px 15px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.menu-item {
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    position: relative;
    transition: color 0.3s;
    white-space: nowrap; /* avoid ugly inner line breaks like "Связи & Сети" */
}

.menu-item::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -5px;
    left: 0;
    background: white;
    opacity: 0;
    transition: 0.3s;
}

#menu-skynitea::after { background: #8A2BE2; }
.menu-item:hover::after, .menu-item.active::after { opacity: 1; }

.container {
    flex: 1;
    padding: 120px 20px 0;
    margin: auto;
    width: 100%;
    max-width: 800px;
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

.content {
    display: none;
    opacity: 0;
    width: 100%;
    height: auto;
    min-height: calc(100vh - 300px);
    transition: opacity 0.3s ease;
    margin-bottom: 100px;
    /* Performance: allow browser to skip rendering off-screen sections */
    content-visibility: auto;
    contain-intrinsic-size: 1px 1000px;
}
.content.active { display: block; opacity: 1; }

.profile img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid #333;
    /* Ensure square avatar never distorts the source image */
    object-fit: cover;
    filter: blur(5px);
    transition: filter 1s, border-color 0.3s;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
.profile img.loaded { filter: blur(0); }

.footer {
    position: relative;
    width: 100%;
    padding: 15px;
    background: #000000;
    color: #666;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    margin-top: auto;
}
.footer.visible { opacity: 1; visibility: visible; }
.footer a { color: #888; text-decoration: none; transition: color 0.3s; font-family: 'Montserrat', sans-serif; font-size: 0.9em; }
.footer a:hover { color: #aaa; }

body.light .footer { background: #f5f5f5; }
body.light .footer a { color: #666; }
body.light .footer a:hover { color: #444; }

.footer-copyright { text-align: center; margin-bottom: 15px; }
.footer-content { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 20px; }
.footer-nav { display: flex; gap: 30px; }
.footer-nav a { color: #888; text-decoration: none; transition: color 0.3s; font-family: 'Montserrat', sans-serif; font-size: 0.9em; }
.footer-telegram { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.footer-telegram span, .footer-telegram a { color: #888; font-family: 'Montserrat', sans-serif; font-size: 0.9em; text-decoration: none; transition: color 0.3s; }

.theme-toggle {
    position: fixed; bottom: 20px; left: 20px; width: 60px; height: 30px; background: #0e0e0e; border: none; border-radius: 15px; cursor: pointer; z-index: 1000; display: none; transition: background-color 0.3s; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.167);
}
.theme-toggle::before { content: '🌙'; position: absolute; left: 5px; top: 50%; transform: translateY(-50%); font-size: 16px; transition: transform 0.3s; }

body.light { background-color: #ffffff; color: #000000; }
body.light .menu-bar { background: rgba(255, 255, 255, 0.9); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
body.light .theme-toggle { background: #ddd; }
body.light .theme-toggle::before { content: '☀️'; transform: translateY(-50%) translateX(30px); }
body.light .footer { background: #f5f5f5; color: #888; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); }
body.light .profile img { border-color: #ddd; box-shadow: 0 0 20px rgba(0, 0, 0, 0.1); }

html.light { background-color: #ffffff; }

.links-container { display: flex; flex-direction: column; gap: 30px; margin-top: 20px; }
.category { text-align: left; padding: 15px; background: rgba(255, 255, 255, 0.05); border-radius: 15px; margin: 10px 0; }
.category h2 { margin-bottom: 15px; font-size: 1.5em; color: #ffffff; }
.buttons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }

.social-button { padding: 12px 20px 25px 20px; border: 2px solid #333; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; text-align: left; }
.social-button .icon,
.social-button .icon-img {
    width: 24px; height: 24px; margin-right: 10px; vertical-align: middle; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.social-button .icon { display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.social-button .icon { color: #fff; }
body.light .social-button .icon { color: #111; }
.social-button .icon-img { display: inline-block; padding: 4px; }
/* Use neutral gray badge so black logos are clearly visible in any theme */
.social-button .icon, .social-button .icon-img { background: #151414; }
body.light .social-button .icon,
body.light .social-button .icon-img { background: #eaeaea; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.social-button > .icon + * { vertical-align: middle; }
.social-button .username { position: absolute; bottom: 6px; right: 10px; font-size: 11px; opacity: 0.7; font-family: 'Montserrat', sans-serif; font-weight: 300; }
.social-button:hover { transform: translateY(-3px); border-color: #ffffff; box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3); }
.social-button::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: 0.5s; }
.social-button:hover::before { left: 100%; }

body.light .category h2 { color: #000000; }
body.light .social-button:hover { border-color: #000000; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); }
body.light .social-button::before { background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent); }

.overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 999; backdrop-filter: blur(6px); opacity: 0; transition: opacity 200ms ease; }
.overlay.visible { display: block; opacity: 1; }

.popup { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.96); background: linear-gradient(180deg, rgba(20,20,22,.9), rgba(14,14,16,.9)); padding: 28px 26px; border-radius: 16px; z-index: 1000; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.04) inset; backdrop-filter: blur(12px) saturate(1.2); width: min(520px, 92vw); color: #eaeaea; opacity: 0; transition: transform 220ms cubic-bezier(.2,.8,.2,1), opacity 220ms ease; }
.popup.show { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.popup.closing { opacity: 0; transform: translate(-50%, -50%) scale(.98); }
.popup-content { margin-top: 10px; font-family: 'Montserrat', sans-serif; font-weight: 300; line-height: 1.7; color: #d6d6d6; }
.popup h3 { margin: 0 0 10px 0; font-weight: 600; font-size: 1.15rem; letter-spacing: .3px; }
.popup-close { position: absolute; top: 10px; right: 12px; cursor: pointer; font-size: 22px; color: #b5b5b5; line-height: 1; padding: 0; border-radius: 0; background: transparent; border: none; transition: color 0.2s ease, transform 0.2s ease; }
.popup-close:hover { color: #ffffff; transform: scale(1.05); background: transparent; }

body.light .popup { background: linear-gradient(180deg, rgba(245,245,245,.96), rgba(235,235,235,.96)); color: #0f0f0f; box-shadow: 0 12px 40px rgba(0,0,0,.2), 0 0 0 1px rgba(0,0,0,.04) inset; }
body.light .popup-content { color: #333; }
body.light .popup-close { color: #666; }
body.light .popup-close:hover { color: #000; background: transparent; }

/* Modal utility buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.05); color: #fff; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s; font-family: 'Montserrat', sans-serif; font-weight: 500; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.25); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-primary { background: linear-gradient(180deg, #5b6cff, #4b59e6); border-color: rgba(255,255,255,0.14); }
.btn-primary:hover { background: linear-gradient(180deg, #6a79ff, #5967f0); }
.btn-secondary { background: rgba(255,255,255,0.06); }

body.light .btn { color: #111; background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.08); }
body.light .btn:hover { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.12); }
body.light .btn-primary { color: #fff; }

/* Modal footer layout */
.popup-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Prevent background scroll when modal open */
body.modal-open { overflow: hidden; }

body.light .category { background: rgba(0, 0, 0, 0.05); }
body.light .popup { background: rgba(240, 240, 240, 0.95); }

/* Improve contrast for primary buttons inside light-themed popups
   (e.g., Copy buttons) by using a lighter background and dark text */
body.light .popup .btn-primary {
    /* Match the Open (secondary) button style in light theme */
    background: rgba(0,0,0,0.06);
    color: #111;
    border-color: rgba(0,0,0,0.08);
}
body.light .popup .btn-primary:hover {
    background: rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.12);
}

/* Small helper style for inline code-like tags */
.code-tag { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; background: rgba(255,255,255,0.06); padding: 4px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.08); color: #fff; }
body.light .code-tag { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.08); color: #111; }

/* Toasts */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: rgba(20,20,22,.92); color: #fff; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.06); box-shadow: 0 8px 24px rgba(0,0,0,.3); opacity: 0; z-index: 10000; transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
body.light .toast { background: rgba(245,245,245,.96); color: #111; border-color: rgba(0,0,0,0.08); }

.social-button.active-account { position: relative; }
.online-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background-color: #2ecc71; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);} 70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(46, 204, 113, 0);} 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);} }

.content p { font-family: 'Montserrat', sans-serif; font-weight: 300; line-height: 1.6; margin: 15px 0; }

.flowing-text-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: hidden; }
.flowing-column { position: absolute; top: 0; width: 40px; height: 100%; }
.flowing-text { position: absolute; writing-mode: vertical-rl; color: rgba(255, 255, 255, 1.4); font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 20px; white-space: nowrap; transform: translateY(-100%); animation: flowDown linear forwards; letter-spacing: 2px; }
body.light .flowing-text { color: rgba(0, 0, 0, 1.4); }
@keyframes flowDown { from { transform: translateY(-100%);} to { transform: translateY(100vh);} }

.name-story-container { margin: 220px auto 180px auto; text-align: left; position: relative; opacity: 0; transform: translateY(20px); animation: fadeInUp 0.8s ease forwards; max-width: min(92vw, 800px); }
.name-story-content { padding: 30px; position: relative; }
.name-story-content::before { content: ''; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3) 20%, rgba(255, 255, 255, 0.3) 80%, rgba(255, 255, 255, 0)); }
.name-story-title { font-size: 1.2em; margin-bottom: 20px; opacity: 0.9; font-weight: 400; position: relative; display: inline-block; }
.name-story-text { font-size: 0.95em; line-height: 1.8; margin-bottom: 15px; font-family: 'Montserrat', sans-serif; font-weight: 300; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px);} to { opacity: 1; transform: translateY(0);} }
body.light .name-story-content::before { background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0)); }

.surname-story-container { margin: 220px auto 180px auto; text-align: right; position: relative; opacity: 0; transform: translateY(20px); animation: fadeInUp 0.8s ease forwards; max-width: min(92vw, 800px); }
.surname-story-content { padding: 30px; position: relative; text-align: right; }
.surname-story-content::before { content: ''; position: absolute; right: 0; top: 0; width: 3px; height: 100%; background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3) 20%, rgba(255, 255, 255, 0.3) 80%, rgba(255, 255, 255, 0)); }
body.light .surname-story-content::before { background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0)); }

.virtual-image-container { margin: 220px auto 180px auto; text-align: left; position: relative; opacity: 0; transform: translateY(20px); animation: fadeInUp 0.8s ease forwards; max-width: min(92vw, 800px); }
.virtual-image-content { padding: 30px; position: relative; text-align: left; }
.virtual-image-content::before { content: ''; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3) 20%, rgba(255, 255, 255, 0.3) 80%, rgba(255, 255, 255, 0)); }
body.light .virtual-image-content::before { background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0)); }

.language-toggle { position: fixed; bottom: 60px; left: 20px; width: 60px; height: 30px; background: #0e0e0e; border: none; border-radius: 15px; cursor: pointer; z-index: 1000; display: none; transition: background-color 0.3s; overflow: hidden; color: white; font-size: 12px; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, 0.167); }
.language-dropdown { display: none; position: fixed; bottom: 100px; left: 20px; background: #0e0e0e; border-radius: 10px; padding: 10px; z-index: 1000; backdrop-filter: blur(10px); transition: transform 0.3s ease; border: 1px solid rgba(255, 255, 255, 0.167); }
.language-option { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; transition: background-color 0.3s; border-radius: 5px; white-space: nowrap; }
.language-option:hover { background-color: rgba(255, 255, 255, 0.1); }
.language-option img { width: 20px; height: auto; }
body.light .language-toggle { background: #ddd; color: black; }
body.light .language-dropdown { background: rgba(245, 245, 245, 0.95); }
body.light .language-option:hover { background-color: rgba(0, 0, 0, 0.1); }

.dot-menu { display: flex; justify-content: center; gap: 12px; margin: 30px 0; background: rgba(255, 255, 255, 0.05); padding: 12px 20px; border-radius: 20px; width: fit-content; margin: 30px auto; position: relative; transition: all 0.3s ease; }
.dot-menu:hover { background: rgba(255, 255, 255, 0.1); transform: scale(1.05); }
body.light .dot-menu { background: rgba(0, 0, 0, 0.05); }
body.light .dot-menu:hover { background: rgba(0, 0, 0, 0.08); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); cursor: pointer; transition: all 0.3s ease; position: relative; }
.dot:hover { transform: scale(1.2); }
.dot.active { background: rgba(255, 255, 255, 1); box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
body.light .dot { background: rgba(0, 0, 0, 0.2); }
body.light .dot.active { background: rgba(0, 0, 0, 0.8); }

.content-group { display: none; opacity: 0; transition: opacity 0.3s ease; }
.content-group.active { display: block; opacity: 1; }

.empty-content { text-align: center; font-family: 'Montserrat', sans-serif; font-weight: 300; color: rgba(255, 255, 255, 0.6); margin: 50px 0; }
body.light .empty-content { color: rgba(0, 0, 0, 0.6); }

/* Skynitea Discord community section */
.skynitea-community {
    position: relative;
    width: min(100%, 760px);
    margin: clamp(18px, 5vh, 58px) auto clamp(170px, 22vw, 250px);
    text-align: center;
}

.skynitea-community-content {
    position: relative;
    padding: clamp(22px, 4vw, 38px) clamp(10px, 4vw, 34px) clamp(18px, 3vw, 30px);
}

.skynitea-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    margin-bottom: 20px;
    padding: 7px 13px;
    border: 1px solid rgba(189, 146, 255, 0.24);
    border-radius: 999px;
    background: rgba(137, 82, 221, 0.08);
    color: rgba(222, 202, 255, 0.78);
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.skynitea-community h1 {
    max-width: 620px;
    margin: 0 auto;
    font-size: clamp(28px, 5.4vw, 48px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.skynitea-description {
    max-width: 650px;
    margin: 22px auto 30px;
    color: rgba(255, 255, 255, 0.66);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(15px, 2.2vw, 17px);
    font-weight: 300;
    line-height: 1.78;
    text-wrap: pretty;
}

.skynitea-discord-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 56px;
    padding: 15px 23px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    background: linear-gradient(135deg, #7657e8, #9f69e8);
    color: #fff;
    box-shadow: 0 12px 34px rgba(105, 70, 216, 0.32), inset 0 1px 0 rgba(255,255,255,0.22);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.skynitea-discord-button::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -55%;
    width: 42%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: rotate(18deg);
    transition: left 0.55s ease;
}

.skynitea-discord-button:hover {
    transform: translateY(-3px);
    filter: brightness(1.08);
    box-shadow: 0 18px 42px rgba(105, 70, 216, 0.44), inset 0 1px 0 rgba(255,255,255,0.3);
}

.skynitea-discord-button:hover::before { left: 120%; }
.skynitea-discord-button:focus-visible { outline: 3px solid rgba(192, 154, 255, 0.72); outline-offset: 4px; }
.skynitea-discord-button svg { width: 22px; height: 22px; flex: 0 0 auto; }
.skynitea-button-arrow { font-size: 17px; line-height: 1; opacity: 0.76; }

.skynitea-discord-hint {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.35);
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 300;
}

.skynitea-future-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 620px;
    margin: 34px auto 0;
    padding: 17px 19px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    color: rgba(255, 255, 255, 0.48);
    text-align: left;
}

.skynitea-future-icon {
    flex: 0 0 auto;
    margin-top: 1px;
    color: rgba(190, 145, 255, 0.85);
    font-size: 15px;
}

.skynitea-future-note p {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.65;
}

body.light .skynitea-eyebrow { background: rgba(116, 62, 194, 0.07); border-color: rgba(116, 62, 194, 0.18); color: rgba(78, 40, 132, 0.75); }
body.light .skynitea-description { color: rgba(0, 0, 0, 0.58); }
body.light .skynitea-discord-hint { color: rgba(0, 0, 0, 0.38); }
body.light .skynitea-future-note { background: rgba(87, 45, 142, 0.035); border-color: rgba(67, 37, 104, 0.09); color: rgba(0, 0, 0, 0.48); }
body.light .skynitea-future-icon { color: rgba(105, 57, 171, 0.82); }

@media screen and (max-width: 600px) {
    .skynitea-community-content { padding-left: 10px; padding-right: 10px; }
    .skynitea-eyebrow { margin-bottom: 17px; font-size: 9px; letter-spacing: 0.13em; }
    .skynitea-description { margin-top: 18px; margin-bottom: 25px; line-height: 1.68; }
    .skynitea-discord-button { width: 100%; min-height: 54px; padding-left: 16px; padding-right: 16px; }
    .skynitea-future-note { margin-top: 28px; padding: 15px 16px; }
}

.theme-toggle, .language-toggle { transition: transform 0.3s ease; }
.toggle-shift { transform: translateY(-150px); }

@media screen and (max-width: 768px) {
    .container { padding-top: 100px; }
    .menu-bar { padding: 5px 10px; }
    .menu-item { font-size: 14px; padding: 6px 10px; }
    .name-story-container, .surname-story-container, .virtual-image-container { margin: 150px 0 100px 0; }
    .buttons-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .flowing-text { font-size: 16px; }
    .footer-content { flex-direction: column; gap: 20px; align-items: center; }
    .footer-nav { flex-direction: column; align-items: center; gap: 15px; }
    .footer-telegram { text-align: center; }
}

/* Mid-width responsiveness: neutralize negative side margins to prevent clipping at various zoom/resolutions */
@media screen and (max-width: 1400px) {
    .name-story-container, .surname-story-container, .virtual-image-container {
        margin: 180px auto 140px auto !important;
        max-width: min(90vw, 800px);
    }
    /* Keep content readable and aligned */
    .surname-story-content, .virtual-image-content, .name-story-content {
        text-align: left;
    }
    /* Move decorative bar to the left on narrower layouts for symmetry */
    .surname-story-content::before { right: auto; left: 0; }
}

/* Normalize story blocks across most viewports to avoid clipping at various zoom levels */
.name-story-container, .surname-story-container, .virtual-image-container {
    margin: 220px auto 180px auto;
    max-width: min(92vw, 800px);
}
.surname-story-content, .virtual-image-content, .name-story-content { text-align: left; }
.surname-story-content::before { right: auto; left: 0; }

/* Large screens: slightly wider max width, keep centered alignment */
@media screen and (min-width: 1600px) {
    .name-story-container, .surname-story-container, .virtual-image-container { max-width: 900px; }
    .surname-story-content::before { left: auto; right: 0; }
}

@media screen and (max-width: 480px) {
    .profile img { width: 150px; height: 150px; }
    .menu-bar { width: 90%; flex-wrap: wrap; justify-content: center; }
    .buttons-grid { grid-template-columns: 1fr; }
    .flowing-text { font-size: 14px; }
    .theme-toggle, .language-toggle { bottom: 10px; }
    .language-toggle { bottom: 50px; }
    .language-dropdown { bottom: 90px; }
}

/* Hardware blocks mid-width adjustments */
@media screen and (max-width: 1400px) {
    .hardware-story-container, .hardware-story-container.hardware-right {
        margin: 120px auto 100px auto !important;
        max-width: min(92vw, 900px);
    }
}

@media screen and (min-width: 1920px) {
    .container { max-width: 1200px; }
    .profile img { width: 220px; height: 220px; }
    .flowing-text { font-size: 24px; }
    .buttons-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .menu-item { font-size: 18px; }
    .name-story-container, .surname-story-container, .virtual-image-container { max-width: 800px; }
}

@media (hover: none) {
    .social-button:hover { transform: none; }
    .menu-item:hover::after { opacity: 0; }
    .dot:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .intro { animation: none; }
    .flowing-text { animation: none; }
    .profile img { transition: none; }
}

/* Allow user to force-enable effects even with reduced motion enabled at OS level */
@media (prefers-reduced-motion: reduce) {
    html.effects-forced * {
        animation-duration: initial !important;
        animation-iteration-count: initial !important;
        transition-duration: initial !important;
    }
    html.effects-forced .flowing-text {
        animation: flowDown linear forwards !important;
    }
}

@media (max-width: 700px) {
    .hardware-story-container, .hardware-story-container.hardware-right { margin: 60px 0 60px 0 !important; max-width: 100%; }
    .hardware-item, .hardware-item.hardware-left, .hardware-item.hardware-right { flex-direction: column !important; align-items: flex-start !important; padding: 0; margin: 0; }
    .hardware-image, .hardware-item.hardware-right .hardware-image { margin: 0 0 15px 0 !important; order: -1; width: 100%; display: flex; justify-content: center; }
    .hardware-info, .hardware-item.hardware-right .hardware-info { text-align: left !important; width: 100%; }
}

.menu-bar { background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); }
.menu-item { letter-spacing: 1px; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.menu-item::after { background: rgba(255, 255, 255, 0.8); height: 2px; bottom: -4px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

.profile img { border: 2px solid rgba(255, 255, 255, 0.1); box-shadow: 0 0 50px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(255, 255, 255, 0.05); transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.profile img:hover { transform: scale(1.02); border-color: rgba(255, 255, 255, 0.2); }

.name-story-container, .surname-story-container, .virtual-image-container { background: rgba(255, 255, 255, 0.02); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.03); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); padding: 25px; }
.name-story-content::before, .surname-story-content::before, .virtual-image-content::before { box-shadow: 0 0 20px rgba(255, 255, 255, 0.05); }

.social-button { background: rgba(255, 255, 255, 0.02); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.social-button:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1); }

.category { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px); transition: all 0.4s ease; }
.category:hover { background: rgba(255, 255, 255, 0.03); transform: translateY(-2px); }
.category h2 { font-weight: 300; letter-spacing: 1px; }
.category h2::after { content: ''; display: block; width: 50px; height: 2px; background: rgba(255, 255, 255, 0.1); margin-top: 10px; transition: width 0.3s ease; }
.category:hover h2::after { width: 100px; }

.online-dot { background: #2ecc71; box-shadow: 0 0 10px rgba(46, 204, 113, 0.5); animation: enhancedPulse 2s ease-in-out infinite; }
@keyframes enhancedPulse { 0% { transform: scale(0.95); opacity: 0.8; } 50% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(0.95); opacity: 0.8; } }

.flowing-text { font-weight: 300; opacity: 0.15; text-shadow: 0 0 20px rgba(255, 255, 255, 0.1); }
body.light .menu-bar { background: rgba(255, 255, 255, 0.9); border-color: rgba(0, 0, 0, 0.05); }
body.light .social-button { background: rgba(0, 0, 0, 0.02); border-color: rgba(0, 0, 0, 0.05); }
body.light .social-button:hover { background: rgba(0, 0, 0, 0.03); border-color: rgba(0, 0, 0, 0.1); }
body.light .social-button .icon { box-shadow: 0 2px 6px rgba(0,0,0,0.15); }

.content { transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.content.active { animation: fadeScale 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes fadeScale { from { opacity: 0; transform: scale(0.98);} to { opacity: 1; transform: scale(1);} }

.footer { background: rgba(0, 0, 0, 0.95); backdrop-filter: blur(10px); border-top: 1px solid rgba(255, 255, 255, 0.05); }
.footer a { position: relative; padding-bottom: 2px; }
.footer a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: currentColor; transition: width 0.3s ease; }
.footer a:hover::after { width: 100%; }

.theme-toggle, .language-toggle { position: fixed; left: 20px; transition: transform 0.3s ease; z-index: 1000; display: none; }
.theme-toggle { bottom: 20px; }
.language-toggle { bottom: 60px; }
.language-dropdown { position: fixed; bottom: 100px; left: 20px; z-index: 1000; }

h1, h2 { background: linear-gradient(120deg, #fff, #aaa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1); animation: gradientShift 8s ease infinite; }
@keyframes gradientShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.menu-item { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); backdrop-filter: blur(5px); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.menu-item:hover { transform: translateY(-2px); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent); box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1); }

.profile { position: relative; display: inline-block; margin: 30px 0; }
@keyframes rotateGradient { 0% { transform: rotate(0deg);} 100% { transform: rotate(360deg);} }

.name-story-container, .surname-story-container, .virtual-image-container { background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); border-radius: 20px; transform-origin: center; transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.name-story-container:hover, .surname-story-container:hover, .virtual-image-container:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.1); }

.content { transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); transform: translateY(20px); opacity: 0; }
.content.active { transform: translateY(0); opacity: 1; }

.social-button { position: relative; background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.05); overflow: hidden; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.social-button::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%); transform: scale(0); transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.social-button:hover::before { transform: scale(1); }
.social-button:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.1); }

.dot-menu { background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)); border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
.dot { transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.dot.active { transform: scale(1.2); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2), 0 0 15px rgba(255, 255, 255, 0.3); }

.flowing-text { background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1); opacity: 0.2; }
body.light .flowing-text { background: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.3)); -webkit-background-clip: text; background-clip: text; }
body.light h1, body.light h2 { background: linear-gradient(120deg, #000, #444); -webkit-background-clip: text; background-clip: text; }

.horror-warning { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, 0.95); padding: 30px; border-radius: 10px; color: #fff; text-align: center; z-index: 9999; box-shadow: 0 0 20px rgba(255, 0, 0, 0.2); border: 1px solid #333; max-width: 400px; }
.horror-warning-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); z-index: 9998; pointer-events: none; }
.horror-warning button { margin: 0 10px; padding: 8px 20px; border: none; border-radius: 5px; cursor: pointer; transition: all 0.3s; }
.horror-warning .yes-button { background: #660000; color: #fff; animation: buttonLag 1s infinite; box-shadow: 0 0 10px rgba(255, 0, 0, 0.5); }
.horror-warning .no-button { background: #333; color: #fff; }
@keyframes buttonLag { 0% { transform: translate(0, 0);} 25% { transform: translate(-2px, 1px);} 50% { transform: translate(1px, -1px);} 75% { transform: translate(-1px, -2px);} 100% { transform: translate(0, 0);} }
.horror-warning .yes-button:hover { animation: buttonLagHover 0.5s infinite; background: #990000; }
@keyframes buttonLagHover { 0% { transform: translate(0, 0) scale(1.1);} 25% { transform: translate(-3px, 2px) scale(1.1);} 50% { transform: translate(2px, -2px) scale(1.1);} 75% { transform: translate(-2px, -3px) scale(1.1);} 100% { transform: translate(0, 0) scale(1.1);} }
.horror-warning p { margin-bottom: 20px; }

.error-message { position: fixed; background: rgba(0, 0, 0, 0.8); color: #ff0000; padding: 10px; border-radius: 5px; font-family: 'Courier New', monospace; pointer-events: none; z-index: 9999; }
.broken-cursor { cursor: none !important; }
@keyframes glitch { 0% { transform: translate(0) } 20% { transform: translate(-2px, 2px) } 40% { transform: translate(-2px, -2px) } 60% { transform: translate(2px, 2px) } 80% { transform: translate(2px, -2px) } 100% { transform: translate(0) } }

.ghost-whisper { position: fixed; font-size: 1em; pointer-events: none; z-index: 9998; animation: fadeInOut 4s ease-in-out forwards; }
@keyframes fadeInOut { 0% { opacity: 0; transform: translateY(10px);} 30% { opacity: 1; transform: translateY(0);} 70% { opacity: 1; transform: translateY(0);} 100% { opacity: 0; transform: translateY(-10px);} }
.fog-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="blur"><feGaussianBlur stdDeviation="5"/></filter><rect width="300" height="300" fill="black" filter="url(%23blur)"/></svg>') repeat; opacity: 0.1; pointer-events: none; z-index: 998; }

.flicker { animation: flickerAnimation 1s infinite; }
@keyframes flickerAnimation { 0% { filter: brightness(1);} 50% { filter: brightness(0.5);} 100% { filter: brightness(1);} }

.ghost-silhouette { position: fixed; top: 0; left: -100px; opacity: 0.2; font-size: 3em; color: rgba(56, 55, 55, 0.594); pointer-events: none; z-index: 9999; animation: ghostMove 15s linear infinite; }
@keyframes ghostMove { 0% { transform: translateX(0) translateY(0);} 100% { transform: translateX(120vw) translateY(50vh);} }

.site-crash { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: black; color: red; font-family: monospace; font-size: 2em; display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 20px; z-index: 99999; animation: glitchBackground 0.2s infinite; pointer-events: none; }
@keyframes glitchBackground { 0% { background: black;} 50% { background: #111;} 100% { background: black;} }

.hardware-title { font-size: 1.7em; font-weight: 400; margin-bottom: 50px; letter-spacing: 1px; background: linear-gradient(120deg, #fff, #aaa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-top: 100px; }
.hardware-list { display: flex; flex-direction: column; gap: 35px; align-items: stretch; margin-bottom: 30px; }
.hardware-story-container { margin: 120px auto 100px auto; text-align: left; position: relative; opacity: 0; transform: translateY(20px); animation: fadeInUp 0.8s ease forwards; max-width: min(92vw, 1000px); }
.hardware-story-container.hardware-right { margin: 120px auto 100px auto; text-align: right; max-width: min(92vw, 1000px); }
.hardware-story-content { padding: 30px; position: relative; width: auto; max-width: 100%; box-sizing: border-box; }
.hardware-story-content::before { content: ''; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3) 20%, rgba(255, 255, 255, 0.3) 80%, rgba(255, 255, 255, 0)); }
body.light .hardware-story-content::before { background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0)); }
.hardware-item { display: flex; align-items: center; border-radius: 18px; background: none !important; box-shadow: none !important; padding: 32px 36px; margin: 0; transition: box-shadow 0.3s; flex-wrap: nowrap; width: 100%; max-width: 950px; box-sizing: border-box; overflow: visible; }
body.light .hardware-item { background: rgba(255,255,255,0.92); }
body:not(.light) .hardware-item { background: rgba(30,30,30,0.92); }
.hardware-item.hardware-left { flex-direction: row; justify-content: flex-start; }
.hardware-item.hardware-right { flex-direction: row-reverse; justify-content: flex-end; }
.hardware-image { flex: 0 0 auto; margin: 0 30px 0 0; display: flex; align-items: center; justify-content: center; }
.hardware-item.hardware-right .hardware-image { margin: 0 40px 0 0 !important; }
.hardware-image img {
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    max-width: 100%;
    max-height: 260px;
    /* Avoid any squishing from HTML width/height attributes */
    height: auto !important;
    object-fit: contain;
    background: none !important;
}
body.light .hardware-image img { background: none !important; box-shadow: none !important; }
.hardware-image img:hover { transform: scale(1.04); box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
.hardware-item.hardware-left .hardware-image { margin-right: 40px; }
@media (max-width: 1100px) {
    .hardware-item, .hardware-item.hardware-left, .hardware-item.hardware-right {
        flex-wrap: wrap;
        gap: 16px 24px;
        padding: 24px;
    }
    .hardware-image, .hardware-item.hardware-right .hardware-image {
        margin: 0 0 16px 0 !important;
        width: 100%;
        justify-content: center;
    }
    .hardware-info, .hardware-item.hardware-right .hardware-info {
        text-align: left !important;
        width: 100%;
    }
    .hardware-image img { max-height: 220px; }
}
@media (max-width: 700px) { .hardware-image, .hardware-item.hardware-right .hardware-image { margin: 0 0 20px 0 !important; } .hardware-image img { max-width: 90vw; max-height: 200px; } }

.hardware-info { flex: 1 1 0; min-width: 0; text-align: left; word-break: break-word; }
.hardware-item.hardware-right .hardware-info { text-align: right; }
.hardware-name { font-size: 1.2em; font-weight: 600; margin-bottom: 2px; color: #fff; letter-spacing: 0.5px; }
.hardware-type { font-size: 0.98em; color: #bbb; margin-bottom: 10px; font-family: 'Montserrat', sans-serif; font-weight: 400; }
.hardware-specs { list-style: none; padding-left: 0; font-family: 'Montserrat', sans-serif; font-size: 1em; color: #ccc; white-space: normal; overflow-wrap: anywhere; }
.hardware-specs li { margin-bottom: 4px; }
body.light .hardware-name { color: #111; }
body.light .hardware-specs { color: #444; }
body.light .hardware-title { background: linear-gradient(120deg, #222, #666); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hardware-name, .hardware-type, .hardware-specs, .hardware-specs li { white-space: normal !important; word-break: break-word; overflow-wrap: break-word; }
@media (max-width: 700px) { .hardware-story-container, .hardware-story-container.hardware-right { margin: 60px 0 60px 0 !important; max-width: 100%; } .hardware-item, .hardware-item.hardware-left, .hardware-item.hardware-right { flex-direction: column !important; align-items: flex-start !important; padding: 0; margin: 0; } .hardware-image, .hardware-item.hardware-right .hardware-image { margin: 0 0 15px 0 !important; } .hardware-info, .hardware-item.hardware-right .hardware-info { text-align: left !important; width: 100%; } }
@media (max-width: 700px) { .hardware-story-container, .hardware-story-container.hardware-right { margin: 60px 0 60px 0 !important; max-width: 100%; } .hardware-item, .hardware-item.hardware-left, .hardware-item.hardware-right { flex-direction: column !important; align-items: flex-start !important; padding: 0; margin: 0; } .hardware-image, .hardware-item.hardware-right .hardware-image { margin: 0 0 15px 0 !important; order: -1; width: 100%; display: flex; justify-content: center; } .hardware-info, .hardware-item.hardware-right .hardware-info { text-align: left !important; width: 100%; white-space: normal !important; word-break: break-word; overflow-wrap: break-word; } .hardware-name, .hardware-type, .hardware-specs, .hardware-specs li { white-space: normal !important; word-break: break-word; overflow-wrap: break-word; } }

.hardware-story-content.hardware-story-content-right::before { left: auto; right: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3) 20%, rgba(255, 255, 255, 0.3) 80%, rgba(255, 255, 255, 0)); }
body.light .hardware-story-content.hardware-story-content-right::before { background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0)); }

:root {
    --neon-blur: 60px;
    --neon-brightness: 1.1;
    --neon-saturate: 1.2;
    --neon-blur-light: 70px;
    --neon-brightness-light: 1.15;
    --neon-saturate-light: 1.1;
    --neon-drift-duration: 18s;
    --neon-drift-distance1: 6vw 8vh;
    --neon-drift-distance2: -5vw -6vh;
    --star-twinkle-duration: 3s;
    --blob-blur: 18px;
    --blob-brightness: 1.1;
    --blob-saturate: 1.2;
    --blob-blur-light: 22px;
    --blob-brightness-light: 1.15;
    --blob-saturate-light: 1.1;
}

.neon-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; opacity: 0.7; filter: blur(var(--neon-blur)) brightness(var(--neon-brightness)) saturate(var(--neon-saturate)); transition: opacity 0.5s; contain: paint; }
.neon-bg::before, .neon-bg::after { content: ''; position: absolute; inset: -10%; will-change: transform; }
.neon-bg::before { background: radial-gradient(ellipse at 80% 30%, #09001194 0%, #020202 60%, transparent 100%); animation: neonDrift1 var(--neon-drift-duration) ease-in-out infinite alternate; transform: translate3d(0,0,0); }
.neon-bg::after { background: radial-gradient(ellipse at 20% 70%, #1d014544 0%, #10000e 60%, transparent 100%); animation: neonDrift2 var(--neon-drift-duration) ease-in-out infinite alternate; transform: translate3d(0,0,0); }
@keyframes neonDrift1 { 0% { transform: translate3d(0,0,0); } 50% { transform: translate3d(var(--neon-drift-distance1)); } 100% { transform: translate3d(0,0,0); } }
@keyframes neonDrift2 { 0% { transform: translate3d(0,0,0); } 50% { transform: translate3d(var(--neon-drift-distance2)); } 100% { transform: translate3d(0,0,0); } }
body.light .neon-bg::before { background: radial-gradient(ellipse at 30% 40%, #f9f99bcc 0%, #fff 60%, transparent 100%); }
body.light .neon-bg::after { background: radial-gradient(ellipse at 70% 60%, #e4c4e8cc 0%, #fff 60%, transparent 100%); }

.blobs-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; overflow: hidden; transition: background 0.5s; }
.blob { position: absolute; border-radius: 50%; filter: blur(var(--blob-blur)) brightness(var(--blob-brightness)) saturate(var(--blob-saturate)); opacity: 0.55; pointer-events: auto; will-change: transform; mix-blend-mode: lighten; box-shadow: 0 0 80px 24px rgba(80,60,120,0.08), 0 0 0 0 transparent; transition: background 0.5s, opacity 0.5s, box-shadow 0.5s; }
body.light .blob { opacity: 0.38; filter: blur(var(--blob-blur-light)) brightness(var(--blob-brightness-light)) saturate(var(--blob-saturate-light)); mix-blend-mode: multiply; }

.decor-stars { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 0; contain: paint; }
.star { position: absolute; width: 2px; height: 2px; background: #fff; border-radius: 50%; opacity: 0.7; animation: starTwinkle var(--star-twinkle-duration) infinite alternate; z-index: 0; will-change: opacity; }
@keyframes starTwinkle { 0% { opacity: 0.4;} 100% { opacity: 1;} }
body.light .star { background: #bbb; opacity: 0.4; }

@media (prefers-reduced-motion: reduce) {
    .neon-bg, body.light .neon-bg { animation: none !important; }
    .star { animation: none !important; }
    .blob { transition: none !important; }
}

.skynitea-yuki-bg {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    /* Scale smoothly between min and max using clamp */
    width: clamp(600px, 50vw, 700px);
    height: auto;
    opacity: 0;
    transition: opacity 0.3s ease-in;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 8px 60px #1a0a2a88);
}
@media (max-width: 900px) { .skynitea-yuki-bg { width: clamp(360px, 70vw, 600px); } }
@media (max-width: 600px) { .skynitea-yuki-bg { width: clamp(300px, 90vw, 500px); } }
@media (max-width: 480px) { .skynitea-yuki-bg { width: clamp(200px, 90vw, 350px); } }
@media (max-width: 320px) { .skynitea-yuki-bg { width: clamp(150px, 90vw, 150px); } }
body:not(#skynitea-active) .skynitea-yuki-bg { opacity: 0 !important; transition: none !important; pointer-events: none; }
body.light#skynitea-active .skynitea-yuki-bg { opacity: 1 !important; }
body:not(.light)#skynitea-active .skynitea-yuki-bg { opacity: 0.6 !important; }
/* Make Yuki smaller on Skynitea page specifically */
body#skynitea-active .skynitea-yuki-bg { width: clamp(240px, 32vw, 420px); }

/* On wide screens, gently stagger blocks with margins (no clipping) */
@media screen and (min-width: 1440px) {
    /* Ensure containers don't exceed viewport even at 80% zoom */
    .name-story-container, .surname-story-container, .virtual-image-container, .hardware-story-container {
        max-width: min(84vw, 1000px);
        position: static; /* cancel any previous relative offsets */
        left: auto; right: auto;
    }
    /* First and third (name, virtual) shift left by adding right margin; second (surname) shifts right by adding left margin */
    .name-story-container, .virtual-image-container { margin-right: clamp(0px, 4vw, 90px); margin-left: 0; }
    .surname-story-container { margin-left: clamp(0px, 4vw, 90px); margin-right: 0; }
}
