/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --text-color: #2C3E50;
    --light-text: #7F8C8D;
    --background: #F7F9FC;
    --light-background: #EDF2F7;
    --border-color: #E2E8F0;
    --gradient-start: #FF6B6B;
    --gradient-end: #4ECDC4;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background);
    padding-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: color 0.3s ease;
}

.logo a span {
    color: var(--text-color);
    font-weight: 800;
    margin-left: 2px;
}

.logo a:hover {
    color: var(--secondary-color);
}

.logo a:hover span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    overflow: visible;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: 0.3s;
}

/* Hero section */
.hero {
    padding: 120px 0 120px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

/* Исходные стили для .btn и .btn-primary */
.btn {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.hero-image:hover img {
    transform: perspective(1000px) rotateY(0deg);
}

@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .hero-image img {
        max-width: 100%;
        height: auto;
    }
}

/* Section styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.section-header p {
    color: var(--light-text);
    font-size: 1.1rem;
}

.section-header .contact-image {
    max-width: 800px;
    margin: 0 auto;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: all 0.5s ease;
}

.section-header .contact-image:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.section-header .contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.section-header .contact-image:hover img {
    transform: scale(1.1);
}

.section-header .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.9), rgba(78, 205, 196, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.section-header .contact-image:hover .image-overlay {
    opacity: 1;
}

.section-header .overlay-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.5s ease;
    padding: 2rem;
}

.section-header .contact-image:hover .overlay-content {
    transform: translateY(0);
}

.section-header .overlay-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-header .overlay-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.section-header .overlay-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    color: white;
}

@media (max-width: 768px) {
    .section-header .contact-image {
        height: 300px;
        margin: 0 -2rem;
        border-radius: 0;
    }
    
    .section-header .overlay-content h3 {
        font-size: 2rem;
    }
    
    .section-header .overlay-content p {
        font-size: 1rem;
    }
}

/* Services section */
.services {
    background: var(--light-background);
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0z" fill="none"/><path d="M20 20m-15 0a15 15 0 1 0 30 0a15 15 0 1 0-30 0" fill="rgba(78,205,196,0.1)"/></svg>');
    opacity: 0.5;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    position: relative;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.service-card:hover i {
    transform: scale(1.2);
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.service-card p {
    color: var(--light-text);
}

/* Work section */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    position: relative;
    align-items: stretch;
}

.work-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.work-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.work-card h3 {
    font-size: 1.2rem;
    margin: 10px 0;
}

.work-card p {
    color: #666;
    margin-bottom: 15px;
}

.game-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    margin-top: 15px;
    cursor: pointer;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background-color: #f5f5f5;
}

.game-image img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* About section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.about-text {
    padding-right: 2rem;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--light-text);
    margin-bottom: 2rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: perspective(1000px) rotateY(-5deg);
    transition: all 0.5s ease;
}

.about-image:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contact section */
.contact {
    background: var(--light-background);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0z" fill="none"/><path d="M20 20m-15 0a15 15 0 1 0 30 0a15 15 0 1 0-30 0" fill="rgba(78,205,196,0.1)"/></svg>');
    opacity: 0.5;
}

.contact-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    height: 500px;
}

.contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.contact-image:hover img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.5s ease;
}

.contact-image:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: #fff;
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

.contact-image:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.overlay-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.info-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    text-align: center;
    transition: transform 0.3s ease;
}

.info-item:hover {
    transform: translateY(-10px);
}

.info-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 1024px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-text {
        padding-right: 0;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .contact-image {
        height: 300px;
    }
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.footer-logo p {
    color: var(--light-text);
    margin-top: 1rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h3 {
    margin-bottom: 1.5rem;
    color: white;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--light-text);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.5rem;
    margin-left: 2rem;
}

.lang-switcher button {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-switcher button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.lang-switcher button.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

/* Responsive design */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 0;
        transition: all 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        visibility: hidden;
        opacity: 0;
        transform: translateX(100%);
    }

    .nav-links.active {
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links li {
        margin: 1rem 0;
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        font-size: 1.2rem;
        color: var(--text-color);
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .nav-links a:hover {
        color: var(--primary-color);
        background: rgba(255, 107, 107, 0.1);
    }

    /* Language switcher in mobile menu */
    .nav-links .lang-switcher {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 2rem;
        padding: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        width: 100%;
    }

    /* Hamburger menu */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        padding: 0;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
        position: relative;
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background: var(--text-color);
        border-radius: 3px;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    /* Fix for iOS devices */
    @supports (-webkit-touch-callout: none) {
        .nav-links {
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
        }

        body.menu-open {
            position: fixed;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }
    }

    /* Fix for Android devices */
    @supports not (-webkit-touch-callout: none) {
        .nav-links {
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 1rem 2rem;
    }
}

/* Games section */
.games {
    background: var(--light-background);
    position: relative;
    overflow: hidden;
}

.games::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0z" fill="none"/><path d="M20 20m-15 0a15 15 0 1 0 30 0a15 15 0 1 0-30 0" fill="rgba(255,107,107,0.1)"/></svg>');
    opacity: 0.5;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    position: relative;
}

.game-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.game-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.game-card:hover i {
    transform: scale(1.2) rotate(5deg);
}

.game-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

.game-card p {
    color: var(--light-text);
    line-height: 1.6;
}

.games-grid .game-panel {
    /* Специальные стили для .game-panel внутри .games-grid */
    min-height: 480px;
    max-width: none;
    height: auto;
    overflow: visible !important;
    background: white;
    border: 1px solid #f0f0f0;
}

.games-grid .game-panel .game-content {
    min-height: 140px;
    padding: 20px;
    background: white;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.games-grid .game-panel .game-image {
    height: 240px;
}

.games-grid .game-panel .btn,
.games-grid .game-panel a.btn,
[data-game-id="puzzle"] .btn,
[data-game-id="puzzle"] a.btn {
    margin-top: 15px !important;
    padding: 10px 25px !important;
    font-size: 14px !important;
    max-width: 180px !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 999 !important;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-align: center !important;
    width: auto !important;
    min-height: 40px !important;
    line-height: 1.2 !important;
    opacity: 1 !important;
    transform: none !important;
    clip: auto !important;
    overflow: visible !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.games-grid .game-panel .btn:hover,
.games-grid .game-panel a.btn:hover,
[data-game-id="puzzle"] .btn:hover,
[data-game-id="puzzle"] a.btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4) !important;
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* iPhone X and newer */
@supports (padding: max(0px)) {
    .navbar {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .nav-links {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
    
    .lang-switcher {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        right: max(20px, env(safe-area-inset-right));
    }
}

/* iPad and tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }
}

/* Android Chrome */
@media screen and (min-resolution: 192dpi) {
    .hamburger span {
        height: 2px;
    }
}

/* Firefox mobile */
@supports (-moz-appearance:none) {
    .nav-links {
        scrollbar-width: thin;
    }

    .hero-image img {
        transform: none;
    }
}

/* Opera mobile */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .nav-links {
        -webkit-transform: translateZ(0);
    }
}

/* Samsung devices */
@media screen and (-webkit-min-device-pixel-ratio:0) and (min-resolution: 192dpi) {
    .hamburger span {
        height: 2px;
    }
}

/* Fix for iOS input zoom */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    input, select, textarea {
        font-size: 16px;
    }
}

/* Fix for iOS momentum scrolling */
@supports (-webkit-touch-callout: none) {
    .nav-links {
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Fix for iOS tap highlight */
@supports (-webkit-touch-callout: none) {
    a, button {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Fix for iOS safe areas */
@supports (padding: max(0px)) {
    .navbar {
        padding-top: max(0px, env(safe-area-inset-top));
    }
    
    .nav-links {
        padding-top: max(70px, env(safe-area-inset-top));
    }
}

/* Mobile optimizations for different browsers and devices */

/* iPhone and iOS devices */
@supports (-webkit-touch-callout: none) {
    .nav-links {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        -webkit-overflow-scrolling: touch;
    }

    .navbar {
        padding-top: env(safe-area-inset-top);
    }

    .hero {
        padding-top: calc(120px + env(safe-area-inset-top));
    }

    /* Fix for iOS input zoom */
    input, select, textarea {
        font-size: 16px;
    }

    /* Fix for iOS momentum scrolling */
    .nav-links, body {
        -webkit-overflow-scrolling: touch;
    }

    /* Fix for iOS tap highlight */
    a, button {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Android devices */
@supports not (-webkit-touch-callout: none) {
    .nav-links {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    /* Fix for Android Chrome */
    @media screen and (min-resolution: 192dpi) {
        .hamburger span {
            height: 2px;
        }
    }
}

/* Firefox mobile */
@supports (-moz-appearance:none) {
    .nav-links {
        scrollbar-width: thin;
    }

    .hero-image img {
        transform: none;
    }
}

/* Opera mobile */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .nav-links {
        -webkit-transform: translateZ(0);
    }
}

/* Samsung devices */
@media screen and (-webkit-min-device-pixel-ratio:0) and (min-resolution: 192dpi) {
    .hamburger span {
        height: 2px;
    }
}

/* iPhone X and newer */
@supports (padding: max(0px)) {
    .navbar {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .nav-links {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
    
    .lang-switcher {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        right: max(20px, env(safe-area-inset-right));
    }
}

/* iPad and tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }
}

/* High-DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Fix for iOS safe areas */
@supports (padding: max(0px)) {
    .navbar {
        padding-top: max(0px, env(safe-area-inset-top));
    }
    
    .nav-links {
        padding-top: max(70px, env(safe-area-inset-top));
    }
}

/* Fix for iOS momentum scrolling */
@supports (-webkit-touch-callout: none) {
    .nav-links {
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Fix for iOS tap highlight */
@supports (-webkit-touch-callout: none) {
    a, button {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Fix for iOS input zoom */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    input, select, textarea {
        font-size: 16px;
    }
}

/* Fix for Android Chrome */
@media screen and (min-resolution: 192dpi) {
    .hamburger span {
        height: 2px;
    }
}

/* Fix for Firefox mobile */
@supports (-moz-appearance:none) {
    .nav-links {
        scrollbar-width: thin;
    }
}

/* Fix for Opera mobile */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .nav-links {
        -webkit-transform: translateZ(0);
    }
}

/* Fix for Samsung devices */
@media screen and (-webkit-min-device-pixel-ratio:0) and (min-resolution: 192dpi) {
    .hamburger span {
        height: 2px;
    }
}

/* Base mobile fixes */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* Container fixes */
.container {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
    overflow-x: hidden;
}

/* Mobile menu fixes */
@media (max-width: 768px) {
    .nav-links {
        width: 100%;
        right: -100%;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.active {
        right: 0;
    }

    /* Fix for content overflow */
    .hero .container,
    .about-content,
    .contact-content,
    .services-grid,
    .work-grid,
    .games-grid {
        width: 100%;
        overflow-x: hidden;
    }

    /* Fix for images */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Fix for buttons */
    .hero-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

/* Fix for iOS devices */
@supports (-webkit-touch-callout: none) {
    body {
        position: relative;
        width: 100%;
        overflow-x: hidden;
    }

    .container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* Fix for Android devices */
@supports not (-webkit-touch-callout: none) {
    body {
        position: relative;
        width: 100%;
        overflow-x: hidden;
    }

    .container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* Fix for Firefox mobile */
@supports (-moz-appearance:none) {
    body {
        overflow-x: hidden;
        width: 100%;
    }
}

/* Fix for Opera mobile */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    body {
        overflow-x: hidden;
        width: 100%;
    }
}

/* Version info */
.version-info {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    font-family: monospace;
}

/* Стили для модального окна визуальной новеллы */
.visual-novel-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow-y: auto;
}

.visual-novel-content {
    max-width: 800px;
    margin: 40px auto;
    background: white;
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.visual-novel-slide {
    display: none;
    text-align: center;
}

.visual-novel-slide.active {
    display: block;
}

.visual-novel-slide img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: contain;
}

.visual-novel-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 20px;
    padding: 0 20px;
}

.visual-novel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.visual-novel-btn {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.visual-novel-btn:hover {
    background: var(--secondary-color);
}

.visual-novel-btn.buy-btn {
    background: #4CAF50;
    font-weight: bold;
}

.visual-novel-btn.buy-btn:hover {
    background: #45a049;
}

/* Стили для окна оплаты */
.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1100;
    justify-content: center;
    align-items: center;
}

.payment-content {
    max-width: 420px;
    margin: 40px auto;
    background: #fff;
    border-radius: 18px;
    padding: 38px 30px 30px 30px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    text-align: center;
}

.payment-content h2 {
    text-align: center;
    margin-bottom: 28px;
    color: #4a90e2;
    font-size: 2rem;
}

.payment-details p {
    margin: 10px 0 18px 0;
    font-size: 1.1rem;
    color: #222;
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 30px 0 28px 0;
}

.payment-method-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 90px;
    box-shadow: 0 2px 8px rgba(74,144,226,0.04);
}

.payment-method-btn:hover, .payment-method-btn.selected {
    border-color: #4a90e2;
    box-shadow: 0 4px 16px rgba(74,144,226,0.10);
}

.payment-method-btn i {
    font-size: 2rem;
    color: #4a90e2;
}

.payment-method-btn span {
    font-size: 1rem;
    color: #333;
}

.payment-submit-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    background: #ff6b6b;
    color: white;
    font-size: 1.15rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
    margin-bottom: 0;
}

.payment-submit-btn:hover {
    background: #e74c3c;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 22px;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
}

.close-modal:hover {
    color: #4a90e2;
}

@media (max-width: 600px) {
    .payment-content, .success-content {
        padding: 18px 5vw 18px 5vw;
        max-width: 98vw;
    }
    .payment-methods {
        gap: 8px;
    }
}

/* Success modal */
.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    z-index: 1200;
    justify-content: center;
    align-items: center;
}

.success-content {
    background: #fff;
    border-radius: 18px;
    padding: 40px 30px 30px 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    position: relative;
}

.success-content h2 {
    color: #4a90e2;
    margin-bottom: 18px;
    font-size: 2rem;
}

.success-content p {
    color: #333;
    margin-bottom: 28px;
    font-size: 1.1rem;
}

.success-btn {
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.success-btn:hover {
    background: #357abd;
}

.success-content .close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 22px;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
}

.success-content .close-modal:hover {
    color: #4a90e2;
}

.game-panel {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: visible;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto;
    max-width: 800px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 500px;
}

.game-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.game-panel .game-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.game-panel .game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 15px 15px 0 0;
    border: 1.5px solid #f3f3f3;
    box-sizing: border-box;
}

.game-panel:hover .game-image img {
    transform: scale(1.05);
}

.game-panel .game-content {
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    min-height: 160px;
}

.game-panel .btn {
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 25px;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 20px;
    text-align: center;
    width: 100%;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}

.game-panel .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.game-panel .game-content p {
    margin-bottom: 28px;
}

@media (max-width: 768px) {
    .game-panel {
        width: 100%;
        max-width: 100vw;
        margin: 0;
        border-radius: 15px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        padding: 0;
        box-sizing: border-box;
    }
    .game-panel .game-image {
        width: 100%;
        aspect-ratio: 3/4;
        border-radius: 15px 15px 0 0;
        overflow: hidden;
        background: #f5f5f5;
        height: auto;
        margin: 0;
    }
    .game-panel .game-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 15px 15px 0 0;
        background: #f5f5f5;
        display: block;
    }
    .game-panel .game-content {
        border-radius: 0 0 15px 15px;
    }
}

.work-card.game-panel {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.work-card.game-panel .game-image {
    height: 300px;
    margin: 0;
    border-radius: 0;
}

.work-card.game-panel .game-content {
    padding: 20px;
    background: white;
}

.work-card.game-panel .game-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.work-card.game-panel .game-content p {
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 15px;
}

.work-card.game-panel .btn {
    padding: 10px 25px;
    font-size: 14px;
    border-radius: 25px;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.work-card.game-panel .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

@media (max-width: 768px) {
    .work-card.game-panel {
        grid-column: span 1;
    }
    
    .work-card.game-panel .game-image {
        height: 200px;
    }
}

.terms-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.terms-content {
    background: #ffffff;
    border-radius: 15px;
    padding: 40px;
    width: 98%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: #333333;
    display: flex;
    flex-direction: column;
}

.terms-content h2 {
    color: #333333;
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
}

.terms-details {
    margin-top: 20px;
}

.age-verification {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.age-verification h3 {
    color: #333333;
    margin-bottom: 15px;
    font-size: 18px;
}

.terms-text {
    margin-bottom: 25px;
}

.terms-text h3 {
    color: #333333;
    margin-bottom: 15px;
    font-size: 18px;
}

.terms-scroll {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.7;
    white-space: pre-line;
    color: #333333;
    flex: 1 1 auto;
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin: 10px 0;
    cursor: pointer;
    user-select: none;
    color: #333333;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-container .checkmark {
    position: relative;
    height: 24px;
    width: 24px;
    background-color: #fff;
    border: 2px solid #4a90e2;
    border-radius: 6px;
    margin-right: 0;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(74,144,226,0.07);
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #4a90e2;
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74,144,226,0.15);
}

.checkbox-container .checkmark:after {
    content: "";
    position: absolute;
    display: block;
    left: 7px;
    top: 3px;
    width: 7px;
    height: 13px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    opacity: 0;
    transform: scale(0.7) rotate(45deg);
    transition: opacity 0.18s cubic-bezier(.4,0,.2,1), transform 0.18s cubic-bezier(.4,0,.2,1);
}

.checkbox-container input:checked ~ .checkmark:after {
    opacity: 1;
    transform: scale(1) rotate(45deg);
}

.terms-buttons {
    position: sticky;
    bottom: 0;
    left: 0;
    background: #fff;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-top: 30px;
    flex-wrap: wrap;
    padding: 20px 0 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
}

.terms-btn {
    padding: 16px 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    min-width: 160px;
}

.accept-btn {
    background: #4a90e2;
    color: white;
}

.accept-btn:hover {
    background: #357abd;
}

.decline-btn {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #333333;
}

.decline-btn:hover {
    background: #e0e0e0;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #666666;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333333;
}

@media (max-width: 1200px) {
    .terms-content {
        max-width: 98vw;
        padding: 20px;
    }
    .terms-scroll {
        max-height: 400px;
        font-size: 15px;
        overflow-y: auto;
    }
}

@media (max-width: 768px) {
    .terms-content {
        width: 100%;
        padding: 10px;
        margin: 10px;
    }
    .terms-scroll {
        max-height: 300px;
        font-size: 14px;
        padding-bottom: 20px;
        overflow-y: auto;
    }
    .terms-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0 5px 0;
    }
    .terms-btn {
        width: 100%;
        min-width: unset;
        font-size: 17px;
        padding: 14px 0;
    }
}

.terms-error {
    color: #e74c3c;
    background: #fff0f0;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0 0 0;
    font-size: 15px;
    text-align: center;
    display: block;
}

.terms-btn:disabled,
.terms-btn[disabled] {
    background: #cccccc !important;
    color: #888888 !important;
    cursor: not-allowed !important;
    border: none;
    opacity: 0.7;
}

.checkbox-container label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    width: 100%;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-container .checkmark {
    position: relative;
    height: 24px;
    width: 24px;
    background-color: #fff;
    border: 2px solid #4a90e2;
    border-radius: 6px;
    margin-right: 0;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(74,144,226,0.07);
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #4a90e2;
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74,144,226,0.15);
}

.checkbox-container .checkmark:after {
    content: "";
    position: absolute;
    display: block;
    left: 7px;
    top: 3px;
    width: 7px;
    height: 13px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    opacity: 0;
    transform: scale(0.7) rotate(45deg);
    transition: opacity 0.18s cubic-bezier(.4,0,.2,1), transform 0.18s cubic-bezier(.4,0,.2,1);
}

.checkbox-container input:checked ~ .checkmark:after {
    opacity: 1;
    transform: scale(1) rotate(45deg);
}

.close-modal svg {
    width: 28px;
    height: 28px;
    display: block;
    stroke: #222;
    transition: stroke 0.2s;
}
.close-modal:hover svg {
    stroke: #4a90e2;
}

.novel-main {
    padding: 120px 0 60px 0;
    background: #f7f9fc;
    min-height: 100vh;
}
.novel-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.novel-sidebar {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    padding: 28px 22px;
    min-width: 260px;
    max-width: 320px;
}
.novel-steps {
    list-style: decimal inside;
    margin: 0 0 18px 0;
    padding: 0;
    color: #4a90e2;
    font-weight: 600;
}
.novel-summary {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 14px 12px;
    margin-top: 18px;
    color: #333;
    font-size: 1rem;
}
.novel-content {
    flex: 1 1 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    padding: 38px 32px;
    min-width: 0;
}
.novel-content h1 {
    font-size: 2.2rem;
    margin-bottom: 24px;
    color: #4a90e2;
}
.novel-text {
    font-size: 1.18rem;
    line-height: 1.8;
    color: #222;
    letter-spacing: 0.01em;
}
@media (max-width: 900px) {
    .novel-container {
        flex-direction: column;
        gap: 24px;
    }
    .novel-sidebar {
        max-width: 100%;
        min-width: unset;
        width: 100%;
    }
    .novel-content {
        padding: 24px 8vw;
    }
}
@media (max-width: 600px) {
    .novel-content {
        padding: 16px 2vw;
    }
    .novel-sidebar {
        padding: 16px 8px;
    }
}