:root {
    --bg-color-light: #ffffff;
    --text-color-light: #333333;
    --bg-color-dark: #0a0a0a;
    --text-color-dark: #ffffff;
    --accent-color: #00c6ff;
    --transition-speed: 0.3s;
    --max-width: 1200px;
}

body {
    background: radial-gradient(circle at center bottom,
            #002642 0%,
            #000814 60%,
            #000000 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    height: 100vh;
    color: #fff;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}


body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20vh;
    background: radial-gradient(circle at center bottom,
            rgba(0, 198, 255, 0.03) 0%,
            transparent 70%);
    pointer-events: none;
    z-index: 1;
    filter: blur(100px);
}

body.light-theme::after {
    background: radial-gradient(circle at center bottom,
            rgba(0, 198, 255, 0.015) 0%,
            transparent 70%);
}

body.light-theme {
    background: #ffffff;
    color: rgba(0, 0, 0, 0.9);
}

body.dark-theme {
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
}

.container {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem;
    width: 100%;
    max-width: var(--max-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s ease all;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.container.loaded {
    opacity: 1;
}

.theme-switcher {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 100;
}

button {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-speed);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    font-size: 0.9rem;
    opacity: 0.7;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

button:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color);
    opacity: 1;
    transform: translateY(-2px);
}

button:focus {
    outline: none;
}

button:active {
    transform: translateY(0);
}

.name-container {
    text-align: center;
    margin-bottom: 0.5rem;
}

.animated-text {
    font-size: 4rem;
    font-weight: 700;
    margin: 0;
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
    line-height: 1;
}

.animated-lang {
    transition: opacity 0.3s ease;
    opacity: 1;
}

.animated-lang.hidden {
    opacity: 0;
}

.description {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.8;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.4s;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.1rem;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.8s;
}

.social-link {
    color: inherit;
    text-decoration: none;
    opacity: 0.7;
    transition: all var(--transition-speed);
    font-size: 1.5rem;
}

.social-link:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
    opacity: 1;
}

.space-objects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.planet {
    position: absolute;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.comet {
    position: absolute;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.comet path {
    stroke-linecap: round;
}

.star {
    position: absolute;
    opacity: 0.8;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

body.light-theme .space-objects {
    opacity: 0;
    visibility: hidden;
}

/* Планеты */
.planet1 {
    top: 20%;
    left: 15%;
    animation: float1 180s linear infinite;
}

.planet2 {
    top: 65%;
    right: 25%;
    animation: float2 200s linear infinite;
}

/* Звезды с разными позициями */
.star1 {
    top: 15%;
    left: 25%;
    animation: twinkle 3s ease-in-out infinite;
}

.star2 {
    top: 45%;
    right: 35%;
    animation: twinkle 4s ease-in-out infinite;
}

.star3 {
    top: 75%;
    left: 65%;
    animation: twinkle 5s ease-in-out infinite;
}

.star4 {
    top: 25%;
    right: 15%;
    animation: twinkle 3.5s ease-in-out infinite;
}

.star5 {
    top: 85%;
    left: 45%;
    animation: twinkle 4.5s ease-in-out infinite;
}

/* Кометы с разными стартовыми позициями и направлениями */
.comet1 {
    top: 15%;
    left: -50px;
}

.comet2 {
    top: 45%;
    right: -40px;
}

.comet3 {
    top: 75%;
    left: -60px;
}

.comet4 {
    top: 30%;
    right: -35px;
}

/* Анимации планет */
@keyframes float1 {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(15vw, 5vh) rotate(90deg);
    }

    50% {
        transform: translate(5vw, 15vh) rotate(180deg);
    }

    75% {
        transform: translate(-10vw, 8vh) rotate(270deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

@keyframes float2 {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(-10vw, 10vh) rotate(120deg);
    }

    66% {
        transform: translate(12vw, -8vh) rotate(240deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Анимация звезд */
@keyframes twinkle {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.1);
    }
}

@keyframes hideContent {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.98);
    }
}

@keyframes showContent {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.language-transition-hide {
    animation: hideContent 0.3s ease forwards !important;
}

.language-transition-show {
    animation: showContent 0.3s ease forwards !important;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000814;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

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

.loading-circle {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: loading-spin 1s linear infinite;
}

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

@media (max-width: 768px) {
    body {
        overflow: hidden;
    }

    body.light-theme {
        background: #ffffff;
        color: rgba(0, 0, 0, 0.9);
    }

    .container {
        padding: 0.5rem;
        min-height: 100vh;
        justify-content: center;
        gap: 0.3rem;
    }

    .name-container {
        margin-bottom: 0;
    }

    .animated-text {
        font-size: 1.6rem;
        line-height: 1;
    }

    .description {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
        line-height: 1;
    }

    .social-links {
        gap: 0.8rem;
        margin-top: 0.4rem;
    }

    .theme-switcher {
        top: 0.5rem;
        right: 0.5rem;
        gap: 0.5rem;
    }

    button {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .social-link {
        font-size: 1.2rem;
    }

    .planet,
    .comet,
    .star {
        opacity: 0.2;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.9;
    }
}

.notice-banner {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.1rem 1.5rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 90%;
    width: max-content;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.notice-banner.show {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: all;
}

.notice-banner a {
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dashed rgba(0, 198, 255, 0.3);
}

.notice-banner a:hover {
    border-bottom-color: rgba(0, 198, 255, 0.8);
}

.notice-banner .notice-close {
    all: unset;
    cursor: pointer;
    font-size: 1.4rem;
    color: inherit;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    margin-left: auto;
}

.notice-banner .notice-close:hover {
    opacity: 1;
}

@media (max-width: 600px) {
    .notice-banner {
        flex-direction: column;
        text-align: center;
        padding: 0.9rem 1.2rem;
        font-size: 1rem;
    }

    .notice-banner .notice-close {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}
