* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #1C2526;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Прелоадер */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1C2526;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

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

.spinner {
    animation: rotate 1.5s linear infinite;
    width: 50px;
    height: 50px;
}

.spinner .path {
    stroke: url(#gradient);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* Header */
header {
    background: rgba(28, 37, 38, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo img {
    height: 50px;
}

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

.nav-links a, .nav-links .back-btn {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    padding: 5px 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-links a:hover, .nav-links .back-btn:hover {
    color: #00C4B4;
}

.nav-links a.active {
    color: #00C4B4;
}

.lang-switcher {
    position: relative;
    margin-left: auto;
}

.lang-switcher .lang-toggle {
    background: linear-gradient(45deg, #FF5733, #00C4B4);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.lang-switcher .lang-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 196, 181, 0.5);
}

.lang-switcher .lang-list {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(28, 37, 38, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 5px;
    padding: 0;
    list-style: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    z-index: 1001;
}

.lang-switcher.active .lang-list {
    max-height: 150px;
    padding: 10px 0;
    opacity: 1;
}

.lang-switcher .lang-list li {
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.lang-switcher .lang-list li:hover {
    background: rgba(0, 196, 181, 0.2);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    width: 30px;
    height: 30px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1C2526, #2A3B3C);
    overflow: hidden;
}

.particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInHero 1s forwards;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #FF5733, #00C4B4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
    color: #00C4B4;
}

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

/* Sections */
section {
    padding: 5rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
    color: #00C4B4;
    position: relative;
}

h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background: #FF5733;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.services-grid-secondary {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 196, 181, 0.3);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    backdrop-filter: blur(5px);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px rgba(0, 196, 181, 0.5);
    border-color: #FF5733;
}

.service-card h3 {
    color: #FF5733;
    margin-bottom: 1rem;
}

.service-card p {
    color: #fff;
}

.service-card a {
    color: #00C4B4;
    text-decoration: none;
}

.service-card a:hover {
    text-decoration: underline;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 196, 181, 0.3);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(5px);
    opacity: 0;
    transform: translateY(20px);
}

.portfolio-card:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 196, 181, 0.5);
}

.portfolio-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: none; /* Скрываем изображения, так как они отсутствуют */
}

.portfolio-card .divider {
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, #FF5733, #00C4B4);
    margin: 0 auto 1rem;
}

.portfolio-card h3 {
    color: #FF5733;
    margin-bottom: 1rem;
}

.portfolio-card p {
    color: #fff;
    margin-bottom: 1rem;
}

.portfolio-card a {
    color: #00C4B4;
    text-decoration: none;
    font-weight: bold;
}

.portfolio-card a:hover {
    text-decoration: underline;
}

.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
}

.under-construction {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1C2526, #2A3B3C);
    overflow: hidden;
}

.game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.construction-content {
    max-width: 600px;
    padding: 20px;
    z-index: 1;
}

.construction-icon {
    margin-bottom: 2rem;
    animation: spin 5s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.construction-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #FF5733, #00C4B4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeInHero 1s forwards;
}

.construction-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #FF5733, #00C4B4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.construction-content p {
    font-size: 1.5rem;
    color: #00C4B4;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInHero 1s forwards 0.5s;
}

.game-controls {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.game-controls button {
    background: linear-gradient(45deg, #FF5733, #00C4B4);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-controls button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 196, 181, 0.5);
}

#score-display {
    font-size: 1.2rem;
    color: #00C4B4;
}

.game-result {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 196, 181, 0.3);
    backdrop-filter: blur(5px);
}

.telegram-button {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.telegram-button .telegram-btn {
    background: linear-gradient(45deg, #FF5733, #00C4B4);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
}

.telegram-button .telegram-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 196, 181, 0.5);
}

footer {
    background: #1C2526;
    text-align: center;
    padding: 1rem;
    border-top: 1px solid #00C4B4;
}

/* Scroll to Top Button with Progress */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
}

.scroll-to-top:hover {
    transform: scale(1.1);
}

.scroll-to-top .progress-circle {
    position: absolute;
    width: 100%;
    height: 100%;
}

.progress-circle .background {
    stroke: rgba(255, 255, 255, 0.2);
}

.progress-circle .progress {
    stroke: url(#gradient);
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dasharray 0.3s;
}

.arrow {
    font-size: 1.5rem;
    color: #fff;
    z-index: 1;
}

/* Cookie Banner (Компактное окно в левом нижнем углу) */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 300px;
    background: rgba(28, 37, 38, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 10px;
    z-index: 2000;
    display: none;
    box-shadow: 0 0 15px rgba(0, 196, 181, 0.3);
}

.cookie-content p {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.cookie-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
}

.cookie-buttons button {
    background: linear-gradient(45deg, #FF5733, #00C4B4);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cookie-buttons button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 196, 181, 0.5);
}

.cookie-buttons button:last-child {
    background: #555;
}

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

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

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

    .hero p {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 2rem;
    }

    .service-card,
    .portfolio-card {
        padding: 1.5rem;
    }

    .nav-links {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: rgba(28, 37, 38, 0.95);
        flex-direction: column;
        gap: 10px;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .nav-links.active {
        max-height: 300px;
        padding: 20px 0;
    }

    .nav-links a {
        font-size: 1.4rem;
        padding: 15px 20px;
        text-align: center;
        display: block;
        transition: background 0.3s;
    }

    .nav-links a:hover {
        background: rgba(0, 196, 181, 0.2);
        color: #fff;
    }

    .menu-toggle {
        display: block;
    }

    .lang-switcher .lang-toggle {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .lang-switcher .lang-list {
        width: 120px;
    }

    .lang-switcher .lang-list li {
        font-size: 0.9rem;
        padding: 8px 15px;
    }

    .scroll-to-top {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }

    .about-text {
        font-size: 1rem;
        line-height: 1.8;
        max-width: 90%;
        margin: 0 auto;
    }

    .telegram-button .telegram-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .construction-content h1 {
        font-size: 2rem;
    }

    .construction-content h2 {
        font-size: 1.5rem;
    }

    .construction-content p {
        font-size: 1.2rem;
    }

    .construction-icon {
        width: 60px;
        height: 60px;
    }

    .game-controls {
        flex-direction: column;
        gap: 0.5rem;
    }

    .game-controls button {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    #score-display {
        font-size: 1rem;
    }

    .cookie-banner {
        bottom: 10px;
        left: 10px;
        max-width: 250px;
        padding: 0.75rem;
    }

    .cookie-content p {
        font-size: 0.8rem;
    }

    .cookie-buttons {
        flex-direction: row;
        gap: 0.5rem;
    }

    .cookie-buttons button {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
}

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

    .hero p {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .service-card,
    .portfolio-card {
        padding: 1rem;
    }

    .nav-links {
        top: 50px;
    }

    .nav-links.active {
        max-height: 250px;
        padding: 15px 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 12px 15px;
    }

    .lang-switcher .lang-toggle {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .lang-switcher .lang-list {
        width: 100px;
    }

    .lang-switcher .lang-list li {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .scroll-to-top {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 1.2rem;
    }

    .about-text {
        font-size: 0.9rem;
        line-height: 1.7;
        max-width: 90%;
        margin: 0 auto;
    }

    .telegram-button .telegram-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .construction-content h1 {
        font-size: 1.5rem;
    }

    .construction-content h2 {
        font-size: 1.2rem;
    }

    .construction-content p {
        font-size: 1rem;
    }

    .construction-icon {
        width: 50px;
        height: 50px;
    }

    .game-controls button {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    #score-display {
        font-size: 0.9rem;
    }

    .cookie-content p {
        font-size: 0.7rem;
    }

    .cookie-buttons button {
        padding: 4px 8px;
        font-size: 0.6rem;
    }
}
