:root {
    --bg-color: #050510;
    --text-color: #a9b5c2;
    --heading-color: #f8f9fa;
    --accent-color: #00e5ff;
    --glass-bg: rgba(20, 20, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --lang-btn-desktop-w: 186px;
    --lang-btn-desktop-h: 56px;
    --lang-btn-mobile-w: 248px;
    --lang-btn-mobile-h: 52px;
}

html, body {
    padding: 0;
    margin: 0;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #050510 0%, #120b22 50%, #081122 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    cursor: none;
}

.main-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 2rem 20px 1.25rem;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.container {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 1.4rem 1rem;
    width: 100%;
    max-width: 860px;
}

h1 {
    color: var(--heading-color);
    margin-bottom: 2rem;
    transition: opacity 0.5s ease, transform 0.5s ease;
    font-size: clamp(1.8rem, 3.6vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    max-width: 14ch;
    margin-left: auto;
    margin-right: auto;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.language-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    width: 100%;
    margin-bottom: 1.45rem;
}

.btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center; /* Center content in the equal-sized buttons */
    gap: 1rem;
    background: rgba(20, 20, 35, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    color: #fff;
    padding: 0.52rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-size: clamp(0.82rem, 0.95vw, 0.9rem);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.38);
    width: fit-content;
    height: auto;
    flex: 0 0 auto;
    cursor: none;
    letter-spacing: -0.01em;
}

.lang-icon {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.lang-icon svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 3D Glossy Marble Overlay */
.lang-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
}

.btn:hover {
    transform: translateY(-6px);
    background: rgba(40, 40, 60, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
}

/* Subtle accent glows on hover */
.btn[href="en/index.html"]:hover { border-color: rgba(0, 123, 255, 0.6); }
.btn[href="de/index.html"]:hover { border-color: rgba(255, 206, 0, 0.6); }
.btn[href="ru/index.html"]:hover { border-color: rgba(213, 43, 30, 0.6); }

.btn-images {
    display: inline-block;
    margin-top: 0.55rem;
    color: rgba(113, 241, 223, 0.42);
    text-decoration: none;
    padding: 0.5rem 0.72rem;
    border: 1px solid rgba(113, 241, 223, 0.14);
    border-radius: 10px;
    transition: opacity 0.25s ease, background 0.25s ease, color 0.25s ease;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: none;
    opacity: 0.2;
}

.btn-images:hover {
    opacity: 0.34;
    background: rgba(10, 24, 40, 0.35);
    color: rgba(113, 241, 223, 0.56);
}

.scroll-container {
    width: 100%;
    overflow: hidden;
    padding: 1rem 0;
}

.scroll-content {
    display: flex;
    justify-content: space-around;
    width: 200%;
    animation: scroll 40s linear infinite;
}

.scroll-content-reverse {
    animation: scroll-reverse 40s linear infinite;
}

.scroll-item {
    flex: 0 0 auto;
    padding: 9px 18px;
    margin: 0 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--accent-color);
    font-size: clamp(0.75rem, 1.5vw, 1rem);
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.scroll-item:hover {
    opacity: 1;
    background: rgba(30, 30, 50, 0.8);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scroll-reverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.btn-images {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(8, 20, 34, 0.3);
    color: rgba(113, 241, 223, 0.42);
    padding: 0.42rem 0.64rem;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: opacity 0.25s ease, background 0.25s ease, color 0.25s ease;
    z-index: 1050;
}

.btn-images:hover {
    background: rgba(9, 23, 38, 0.44);
    color: rgba(113, 241, 223, 0.56);
}

.btn-images:active {
    transform: none;
    box-shadow: none;
}

#cursor-dot {
    width: 24px;
    height: 24px;
    position: fixed;
    top: -100px;
    left: -100px;
    pointer-events: none;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    user-select: none;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}
#cursor-dot::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #00e5ff;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.8;
    box-shadow: 0 0 10px #00e5ff;
}

#cursor-glow {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.15) 0%, rgba(0, 229, 255, 0) 70%);
    position: fixed;
    pointer-events: none;
    z-index: 999998;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: transform 0.1s ease-out;
}

footer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    opacity: 0.6;
    margin-top: auto;
}

@media (max-width: 768px) {
    .main-container {
        justify-content: flex-start;
        padding: 1.1rem 14px 1.5rem;
        gap: 0.35rem;
    }

    .container {
        max-width: 460px;
        padding: 0.6rem 0.25rem 0.75rem;
    }

    h1 {
        max-width: 9ch;
        margin-bottom: 1.35rem;
        font-size: clamp(1.72rem, 8.6vw, 2.28rem);
        line-height: 1.08;
    }

    .language-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.72rem;
        margin-bottom: 0.62rem;
    }

    .btn {
        width: fit-content;
        height: auto;
        padding: 0.5rem 0.88rem;
        border-radius: 14px;
        justify-content: center;
        font-size: 0.84rem;
    }

    .lang-icon {
        width: 26px;
        height: 26px;
    }

    .scroll-container {
        padding: 0.7rem 0;
    }

    .scroll-item {
        padding: 8px 15px;
        margin: 0 10px;
        font-size: 0.95rem;
    }

    .btn-images {
        position: static;
        right: auto;
        bottom: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: center;
        margin-top: 0.28rem;
        margin-bottom: 0.1rem;
        padding: 0.38rem 0.62rem;
        font-size: 0.66rem;
        opacity: 0.16;
    }

    footer {
        padding: 1.35rem 0 0.85rem;
        font-size: 0.8rem;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 940px;
    }

    h1 {
        font-size: clamp(2.5rem, 3.6vw, 4rem);
    }

    .language-buttons {
        gap: 1.05rem;
    }

    .btn {
        width: fit-content;
        height: auto;
        padding: 0.54rem 1.02rem;
    }
}

@media (max-width: 420px) {
    :root {
        --lang-btn-mobile-w: 236px;
        --lang-btn-mobile-h: 48px;
    }

    .main-container {
        padding: 0.85rem 10px 1.2rem;
    }

    .container {
        padding: 0.45rem 0;
    }

    h1 {
        font-size: clamp(1.86rem, 9.6vw, 2.34rem);
        margin-bottom: 1.05rem;
        max-width: 8.5ch;
    }

    .language-buttons {
        gap: 0.75rem;
        margin-bottom: 0.55rem;
    }

    .btn {
        padding: 0.45rem 0.75rem;
        gap: 0.56rem;
        font-size: 0.78rem;
        border-radius: 14px;
    }

    .lang-icon {
        width: 24px;
        height: 24px;
    }

    .scroll-container {
        padding: 0.55rem 0;
    }

    .scroll-item {
        padding: 7px 12px;
        margin: 0 8px;
        font-size: 0.84rem;
    }

    .btn-images {
        margin-top: 0.18rem;
        padding: 0.34rem 0.54rem;
        font-size: 0.62rem;
        opacity: 0.14;
    }

    footer {
        padding: 1rem 0 0.55rem;
        font-size: 0.72rem;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    :root {
        --lang-btn-mobile-w: 224px;
        --lang-btn-mobile-h: 44px;
    }

    .main-container {
        padding: 0.6rem 12px 0.9rem;
        gap: 0.15rem;
    }

    .scroll-container {
        padding: 0.38rem 0;
    }

    .scroll-item {
        padding: 6px 11px;
        margin: 0 7px;
        font-size: 0.76rem;
    }

    .container {
        padding: 0.2rem 0;
    }

    h1 {
        font-size: clamp(1.45rem, 4.8vw, 2rem);
        margin-bottom: 0.65rem;
        line-height: 1.06;
        max-width: 11ch;
    }

    .language-buttons {
        gap: 0.52rem;
        margin-bottom: 0.5rem;
    }

    .btn {
        padding: 0.32rem 0.62rem;
        font-size: 0.72rem;
        border-radius: 14px;
    }

    .lang-icon {
        width: 21px;
        height: 21px;
    }

    .btn-images {
        margin-top: 0.12rem;
        padding: 0.3rem 0.5rem;
        font-size: 0.58rem;
        opacity: 0.12;
    }

    footer {
        padding: 0.6rem 0 0.35rem;
        font-size: 0.66rem;
    }
}

@media (hover: none), (pointer: coarse) {
    html, body, .btn, .btn-images {
        cursor: auto;
    }

    #cursor-dot,
    #cursor-glow {
        display: none !important;
    }
}
