:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #38bdf8;
    --secondary: #6366f1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
    line-height: 1.6;
}

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

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(14, 165, 233, 0.1));
    animation: float 20s infinite ease-in-out;
}

.bg-circle:nth-child(1) {
    width: 500px;
    height: 500px;
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.bg-circle:nth-child(2) {
    width: 300px;
    height: 300px;
    top: 50%;
    right: -150px;
    animation-delay: 5s;
}

.bg-circle:nth-child(3) {
    width: 400px;
    height: 400px;
    bottom: -200px;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotate 3s linear infinite;
}

.logo-icon .icon {
    width: 100%;
    height: 100%;
    color: var(--primary);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { width: 0; }
    to { width: 100%; }
}

/* Buttons */
.btn-primary, .btn-outline, .btn-large {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    padding: 40px 0 100px 0;
    position: relative;
    overflow: visible;
    min-height: 500px;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text {
    text-align: left;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 450px;
    margin-top: 3rem;
    overflow: visible;
    padding: 20px 0;
}

.chess-pieces-images {
    display: flex;
    gap: 120px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 700px;
    overflow: visible;
}

.chess-image-piece {
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.chess-image-piece:hover {
    transform: translateY(-8px) scale(1.05);
}

/* Конь - выше и плавное движение */
.chess-image-piece.knight-image {
    transform: translateY(-20px);
    animation: floatKnight 4s ease-in-out infinite;
}

/* Ладья - ниже и плавное движение */
.chess-image-piece.rook-image {
    transform: translateY(20px);
    animation: floatRook 4s ease-in-out infinite 0.5s;
}

@keyframes floatKnight {
    0%, 100% {
        transform: translateY(-20px) translateX(0px);
    }
    50% {
        transform: translateY(-30px) translateX(5px);
    }
}

@keyframes floatRook {
    0%, 100% {
        transform: translateY(20px) translateX(0px);
    }
    50% {
        transform: translateY(30px) translateX(-5px);
    }
}

.chess-piece-img {
    width: 234px; /* 200px * 1.17 = 234px (увеличение на 17%) */
    height: auto;
    max-height: 328px; /* 280px * 1.17 = 327.6px */
    object-fit: contain;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: transparent;
    position: relative;
    z-index: 1;
}

.chess-image-piece {
    background: transparent;
}

.animated-chess-pieces-large {
    display: flex;
    gap: 100px;
    width: 100%;
    max-width: 800px;
    height: 400px;
    position: relative;
    align-items: center;
    justify-content: center;
}

.chess-piece-large {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.3));
    width: 280px;
    height: 280px;
}

.chess-piece-large svg {
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
}

/* Анимации для больших фигур */
.chess-piece-large.knight {
    animation: floatKnightLarge 4s ease-in-out infinite;
}

.chess-piece-large.rook {
    animation: floatRookLarge 3.5s ease-in-out infinite 0.5s;
}

@keyframes floatKnightLarge {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    20% {
        transform: translateY(-25px) rotate(3deg) scale(1.08);
    }
    40% {
        transform: translateY(-15px) rotate(-2deg) scale(1.05);
    }
    60% {
        transform: translateY(-30px) rotate(2deg) scale(1.1);
    }
    80% {
        transform: translateY(-10px) rotate(-1deg) scale(1.03);
    }
}

@keyframes floatRookLarge {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-20px) rotate(-2deg) scale(1.06);
    }
    50% {
        transform: translateY(-12px) rotate(0deg) scale(1);
    }
    75% {
        transform: translateY(-28px) rotate(2deg) scale(1.08);
    }
}

.chess-piece-large:hover svg {
    transform: scale(1.2) rotate(8deg);
    filter: drop-shadow(0 15px 40px rgba(102, 126, 234, 0.5));
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero-badge .icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
    text-align: left;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

.hero-description {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 0 2.5rem 0;
    animation: fadeInUp 0.8s ease 0.2s both;
    text-align: left;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* Stats Section */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.6s both;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Features */
.features {
    padding: 100px 0;
    background: white;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--dark);
}

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

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s infinite;
}

.feature-icon .icon {
    width: 100%;
    height: 100%;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon .icon {
    transform: scale(1.1) rotate(5deg);
}

/* SVG Icons */
.icon {
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
}

.icon-small {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    fill: currentColor;
    color: var(--primary);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

.feature-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* How It Works */
.how-it-works {
    padding: 100px 0;
    background: white;
    position: relative;
    overflow: hidden;
}

.how-it-works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.steps-timeline {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.steps-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, 
        rgba(102, 126, 234, 0.2) 0%, 
        rgba(102, 126, 234, 0.4) 50%, 
        rgba(118, 75, 162, 0.2) 100%);
    transform: translateX(-50%);
    z-index: 0;
}

.step-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
    position: relative;
    animation: fadeInUp 0.6s ease both;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-item:nth-child(1) { animation-delay: 0.1s; }
.step-item:nth-child(2) { animation-delay: 0.2s; }
.step-item:nth-child(3) { animation-delay: 0.3s; }
.step-item:nth-child(4) { animation-delay: 0.4s; }

.step-item.reverse {
    direction: rtl;
}

.step-item.reverse > * {
    direction: ltr;
}

.step-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.step-number-large {
    font-size: 6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    opacity: 0.15;
    transition: opacity 0.3s ease;
}

.step-item:hover .step-number-large {
    opacity: 0.25;
}

.step-icon-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 5px solid white;
}

.step-icon-circle::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.step-item:hover .step-icon-circle {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.step-item:hover .step-icon-circle::before {
    opacity: 0.3;
}

.step-icon {
    width: 40px;
    height: 40px;
    color: white;
    transition: transform 0.4s ease;
}

.step-item:hover .step-icon {
    transform: scale(1.1);
}

.step-right {
    position: relative;
}

.step-content-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.step-content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s ease;
}

.step-item:hover .step-content-card {
    transform: translateX(10px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.1);
}

.step-item.reverse:hover .step-content-card {
    transform: translateX(-10px);
}

.step-item:hover .step-content-card::before {
    transform: scaleY(1);
}

.step-content-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.step-content-card p {
    color: var(--gray);
    line-height: 1.7;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

/* Pricing */
.pricing {
    padding: 100px 0;
    background: white;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s;
    position: relative;
    border: 2px solid transparent;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.05);
}

.pricing-card.featured .badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

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

.price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2rem;
}

.price span {
    font-size: 1rem;
    color: var(--gray);
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.75rem 0;
    color: var(--gray);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li .icon-small {
    flex-shrink: 0;
}

.pricing-features li:last-child {
    border-bottom: none;
}

/* CTA */
.cta {
    padding: 100px 0;
    background: var(--gradient);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta .btn-primary {
    background: white;
    color: var(--primary);
}

.cta .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Footer */
.footer {
    padding: 3rem 0;
    background: var(--dark);
    color: white;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer .logo {
    color: white;
}

/* Forms */
.form-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.form-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--dark);
}

.form-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-error {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.form-error.show {
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Dashboard */
.dashboard-container {
    min-height: 100vh;
    padding: 2rem 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.game-id {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
}

.game-date {
    font-size: 0.9rem;
    color: var(--gray);
}

.delete-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: transform 0.3s;
}

.delete-btn:hover {
    transform: scale(1.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--dark);
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(14, 165, 233, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .step-item {
        gap: 2rem;
    }
    
    .step-number-large {
        font-size: 4rem;
    }
    
    .step-icon-circle {
        width: 80px;
        height: 80px;
    }
    
    .step-icon {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 768px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .chess-pieces-images {
        gap: 50px;
        max-width: 100%;
        flex-wrap: wrap;
    }
    
    .chess-piece-img {
        width: 176px; /* 150px * 1.17 = 175.5px */
        max-height: 246px; /* 210px * 1.17 = 245.7px */
    }
    
    .chess-image-piece.knight-image {
        transform: translateY(-10px);
    }
    
    .chess-image-piece.rook-image {
        transform: translateY(10px);
    }
    
    .hero-visual {
        min-height: 300px;
        margin-top: 2rem;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        text-align: center;
    }
    
    .hero-description {
        text-align: center;
        margin: 0 auto 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .animated-chess-pieces-large {
        flex-direction: column;
        gap: 40px;
        max-width: 100%;
        height: auto;
        min-height: 500px;
    }
    
    .chess-piece-large {
        width: 200px;
        height: 200px;
    }
    
    .animated-chess-pieces-large {
        gap: 50px;
        max-width: 100%;
    }
    
    .hero-visual {
        min-height: 500px;
    }
    
    .stats-section {
        padding: 60px 0;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin: 0 auto;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
    
    
    .nav {
        gap: 1rem;
    }
    
    .features-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-timeline::before {
        left: 30px;
    }
    
    .step-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
        padding-left: 80px;
    }
    
    .step-item.reverse {
        direction: ltr;
        padding-left: 80px;
        padding-right: 0;
    }
    
    .step-left {
        position: absolute;
        left: 0;
        top: 0;
        align-items: flex-start;
    }
    
    .step-number-large {
        font-size: 3rem;
        opacity: 0.1;
    }
    
    .step-icon-circle {
        width: 60px;
        height: 60px;
        border-width: 3px;
    }
    
    .step-icon {
        width: 28px;
        height: 28px;
    }
    
    .step-content-card {
        padding: 1.5rem;
    }
    
    .step-content-card h3 {
        font-size: 1.3rem;
    }
    
    .step-item:hover .step-content-card {
        transform: translateX(0);
    }
}

/* Drop Zone Styles */
.drop-zone {
    transition: all 0.3s ease;
}

.drop-zone:hover {
    border-color: var(--primary) !important;
    background-color: rgba(14, 165, 233, 0.05) !important;
}

/* Toast (регистрация и др.) */
.app-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    max-width: 22rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    animation: app-toast-in 0.3s ease;
}
.app-toast--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.app-toast--warn {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
@keyframes app-toast-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==== Шахматная доска: подсветка последнего хода ==== */
/* Красная подсветка при срублении фигуры */
.chess-square.last-move-capture {
    position: relative;
    box-shadow: inset 0 0 0 3px rgba(239, 68, 68, 0.95);
    background-color: rgba(239, 68, 68, 0.25);
    animation: capture-flash 0.6s ease-out;
}

@keyframes capture-flash {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.9);
        background-color: rgba(239, 68, 68, 0.45);
    }
    60% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
        background-color: rgba(239, 68, 68, 0.25);
    }
    100% {
        box-shadow: inset 0 0 0 3px rgba(239, 68, 68, 0.95);
        background-color: rgba(239, 68, 68, 0.2);
    }
}
