/* Сброс стилей и базовые настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --accent: #4a9eff;
    --accent-hover: #5ba8ff;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --highlight-color: #6bb5ff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header и Navigation */
.header {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-image {
    width: 50px;
}

.logo-text {
    background: linear-gradient(135deg, var(--accent), #6bb5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu li {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1rem;
}

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

.burger-menu {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

.burger-menu span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Мобильное меню */
.mobile-menu {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    z-index: 2000;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-right: 1px solid var(--border-color);
    visibility: hidden;
    opacity: 0;
}

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

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-logo {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.close-menu {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-menu:hover {
    background: var(--bg-tertiary);
}

.mobile-nav-menu {
    list-style: none;
    padding: 2rem 1.5rem;
    flex: 1;
}

.mobile-nav-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 1rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--text-primary);
}

.mobile-menu-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.mobile-get-coupon {
    width: 100%;
}

/* Hero Section */
.hero-section {
    padding: 10rem 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
    text-align: center;
    background: 
        radial-gradient(circle at 20% 50%, rgba(74, 158, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(107, 191, 255, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-primary) 0%, #252525 50%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.02) 2px,
            rgba(255, 255, 255, 0.02) 4px
        );
    pointer-events: none;
    opacity: 0.5;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

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

.hero-section .container {
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.coupons-count {
    color: var(--text-primary);
    font-size: 3.5rem;
    transition: all 0.3s ease;
}

.coupons-count.highlighted {
    color: var(--highlight-color);
    text-shadow: 0 0 15px rgba(107, 191, 255, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

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

.hero-text {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #5ba8ff);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-large {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.btn-copy {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem auto 0;
    padding: 0.875rem 2rem;
}

.btn-copy:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

/* Секции */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
}

/* About Section */
.about-section {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #353535 50%, #2a2a2a 100%);
}

.about-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

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

.benefit-card {
    background: linear-gradient(135deg, var(--glass-bg) 0%, rgba(74, 158, 255, 0.08) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.benefit-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.benefit-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Instructions Section */
.instructions-section {
    background: linear-gradient(180deg, var(--bg-primary) 0%, #252525 50%, #1f1f1f 100%);
}

.steps-list {
    max-width: 900px;
    margin: 3rem auto 0;
}

.step-item {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

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

.step-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.step-number {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-primary);
}

.step-info {
    flex: 1;
}

.step-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.step-image {
    margin-top: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.image-placeholder {
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: 8px;
}

.instructions-img {
  max-width: 100%;
}

.instructions-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
}

/* Conclusion Section */
.conclusion-section {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #353535 50%, #2a2a2a 100%);
}

.conclusion-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: center;
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Поп-ап */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.popup-overlay.active {
    display: flex;
}

.popup-content {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.popup-close:hover {
    background: var(--bg-tertiary);
}

.popup-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Анимация кубика */
.dice-container {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    margin: 2rem 0;
    height: 150px;
}

.dice {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    animation: roll 2s infinite ease-in-out;
}

@keyframes roll {
    0% { 
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    12.5% { 
        transform: rotateX(90deg) rotateY(45deg) rotateZ(45deg);
    }
    25% { 
        transform: rotateX(180deg) rotateY(90deg) rotateZ(90deg);
    }
    37.5% { 
        transform: rotateX(270deg) rotateY(135deg) rotateZ(135deg);
    }
    50% { 
        transform: rotateX(360deg) rotateY(180deg) rotateZ(180deg);
    }
    62.5% { 
        transform: rotateX(450deg) rotateY(225deg) rotateZ(225deg);
    }
    75% { 
        transform: rotateX(540deg) rotateY(270deg) rotateZ(270deg);
    }
    87.5% { 
        transform: rotateX(630deg) rotateY(315deg) rotateZ(315deg);
    }
    100% { 
        transform: rotateX(720deg) rotateY(360deg) rotateZ(360deg);
    }
}

.dice-face {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
}

.dice-face-1 { transform: rotateY(0deg) translateZ(50px); }
.dice-face-2 { transform: rotateY(90deg) translateZ(50px); }
.dice-face-3 { transform: rotateX(90deg) translateZ(50px); }
.dice-face-4 { transform: rotateX(-90deg) translateZ(50px); }
.dice-face-5 { transform: rotateY(-90deg) translateZ(50px); }
.dice-face-6 { transform: rotateY(180deg) translateZ(50px); }

.dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Позиционирование точек для грани 1 (одна точка в центре) */
.dice-face-1 .dot {
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Позиционирование точек для грани 2 (две точки по диагонали) */
.dice-face-2 .dot:nth-child(1) {
    top: 25%;
    left: 25%;
}
.dice-face-2 .dot:nth-child(2) {
    bottom: 25%;
    right: 25%;
}

/* Позиционирование точек для грани 3 (три точки по диагонали) */
.dice-face-3 .dot:nth-child(1) {
    top: 20%;
    left: 20%;
}
.dice-face-3 .dot:nth-child(2) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.dice-face-3 .dot:nth-child(3) {
    bottom: 20%;
    right: 20%;
}

/* Позиционирование точек для грани 4 (четыре точки по углам) */
.dice-face-4 .dot:nth-child(1) {
    top: 25%;
    left: 25%;
}
.dice-face-4 .dot:nth-child(2) {
    top: 25%;
    right: 25%;
}
.dice-face-4 .dot:nth-child(3) {
    bottom: 25%;
    left: 25%;
}
.dice-face-4 .dot:nth-child(4) {
    bottom: 25%;
    right: 25%;
}

/* Позиционирование точек для грани 5 (пять точек: четыре по углам + одна в центре) */
.dice-face-5 .dot:nth-child(1) {
    top: 25%;
    left: 25%;
}
.dice-face-5 .dot:nth-child(2) {
    top: 25%;
    right: 25%;
}
.dice-face-5 .dot:nth-child(3) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.dice-face-5 .dot:nth-child(4) {
    bottom: 25%;
    left: 25%;
}
.dice-face-5 .dot:nth-child(5) {
    bottom: 25%;
    right: 25%;
}

/* Позиционирование точек для грани 6 (шесть точек: две колонки по три) */
.dice-face-6 .dot:nth-child(1) {
    top: 20%;
    left: 25%;
}
.dice-face-6 .dot:nth-child(2) {
    top: 20%;
    right: 25%;
}
.dice-face-6 .dot:nth-child(3) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.dice-face-6 .dot:nth-child(4) {
    top: 50%;
    left: 25%;
    transform: translateY(-50%);
}
.dice-face-6 .dot:nth-child(5) {
    bottom: 20%;
    left: 25%;
}
.dice-face-6 .dot:nth-child(6) {
    bottom: 20%;
    right: 25%;
}

.loading-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Отображение купона */
.coupon-display {
    text-align: center;
}

.coupon-code {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.copy-icon {
    font-size: 1.2rem;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }

    .burger-menu {
        display: flex;
    }
    
    .hero-section {
        padding: 8rem 0;
        min-height: 60vh;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 5rem 0;
        min-height: auto;
    }

    .hero-title {
        font-size: 2rem;
    }

    .coupons-count {
        font-size: 2.5rem;
    }

    .hero-text {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .step-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        min-width: auto;
    }

    .popup-content {
        padding: 1.5rem;
    }

    .coupon-code {
        font-size: 1.4rem;
        padding: 1.5rem;
    }
}

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

    .coupons-count {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }

    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

