@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --accent: #059669;
    --bg: #F9FAFB;
    --bg-white: #FFFFFF;
    --text: #111827;
    --text-light: #4B5563;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Modern UI Colors */
    --gradient-primary: linear-gradient(135deg, #4F46E5, #8B5CF6);
    --gradient-accent: linear-gradient(135deg, #10B981, #059669);
    --surface: rgba(255, 255, 255, 0.7);
    --surface-border: rgba(255, 255, 255, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER ===== */

.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.95);
}

.header .container.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    flex-shrink: 0;
}

.lang-planet {
    font-size: 1.1rem;
    line-height: 1;
    margin-right: 2px;
}

.lang-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color var(--transition), background var(--transition);
}

.lang-link:hover {
    color: var(--primary);
    background: var(--bg);
}

.lang-link.is-active {
    color: var(--primary);
}

.lang-sep {
    color: var(--text-muted);
    user-select: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav a, .nav button {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text);
}

.nav a:hover, .nav button:hover {
    background: var(--bg);
    color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: #00A381;
    color: white;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1.05rem;
}

/* ===== MODERN UTILITIES ===== */
.relative { position: relative; }
.z-10 { z-index: 10; }
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
    pointer-events: none;
}
.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(79, 70, 229, 0.2);
}
.btn-glow {
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
}
.btn-glow:hover {
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.6);
}
.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.modern-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.modern-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}
.modern-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}
.modern-card:hover::before {
    opacity: 1;
}

/* ===== HERO ===== */

.hero {
    padding: 100px 0 80px;
    text-align: center;
}

.hero h1.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    color: var(--text);
}

.hero p.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 0;
}

.hero-stat {
    flex: 1;
    text-align: center;
}

.hero-stat.divider {
    flex: 0 0 1px;
    height: 40px;
    background: var(--border);
}

.hero-stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}

.hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* ===== FEATURES ===== */

.features {
    padding: 80px 0;
}

.section-bg {
    background: linear-gradient(180deg, var(--bg) 0%, #FFFFFF 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-icon-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary);
}

.feature-icon {
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== SECTION ===== */

.section {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

/* ===== CATALOG ===== */

.catalog-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid var(--border);
    background: var(--bg-white);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text);
}

.filter-btn:hover, .filter-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(108,92,231,0.05);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.product-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.product-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.product-icon.telegram-bot {
    background: rgba(108,92,231,0.1);
}

.product-icon.wordpress-plugin {
    background: rgba(0,184,148,0.1);
}

.product-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.product-category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.product-category.telegram-bot {
    background: rgba(108,92,231,0.1);
    color: var(--primary);
}

.product-category.wordpress-plugin {
    background: rgba(0,184,148,0.1);
    color: var(--accent);
}

.product-description {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 16px;
    flex-grow: 1;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.product-install-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== PRODUCT PAGE ===== */

.product-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.product-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
}

.product-detail-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.product-detail-icon.telegram-bot {
    background: rgba(108,92,231,0.1);
}

.product-detail-icon.wordpress-plugin {
    background: rgba(0,184,148,0.1);
}

.product-detail-info h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.product-detail-info .product-category {
    margin-bottom: 0;
}

.product-detail-description {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 32px;
}

.product-features {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
}

.product-features h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.product-features ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.product-features li {
    font-size: 0.92rem;
    padding-left: 24px;
    position: relative;
    color: var(--text-light);
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.product-detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 800;
}

.product-detail-time {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== CHECKOUT ===== */

.checkout-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 0;
}

.checkout-product-summary {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.checkout-product-summary h3 {
    font-size: 1.1rem;
}

.checkout-product-summary .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.checkout-form {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.checkout-form h2 {
    font-size: 1.3rem;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* ===== SUCCESS ===== */

.success-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 0;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(0,184,148,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 24px;
}

.success-page h1 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.success-page > p {
    color: var(--text-light);
    margin-bottom: 32px;
}

.key-block {
    background: var(--bg-white);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}

.key-block label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    display: block;
    margin-bottom: 12px;
}

.key-value {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    word-break: break-all;
    user-select: all;
}

.key-copy-btn {
    margin-top: 12px;
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.key-copy-btn:hover {
    background: var(--primary-dark);
}

.key-warning {
    background: #FFF3CD;
    border: 1px solid #FFECB5;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 32px;
    font-size: 0.9rem;
    color: #856404;
    font-weight: 500;
}

.key-warning strong {
    display: block;
    margin-bottom: 4px;
}

/* ===== MODAL ===== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 32px;
    width: 90%;
    max-width: 460px;
    position: relative;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-light);
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--border);
    color: var(--text);
}

.modal h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.modal p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.modal .form-group {
    margin-bottom: 16px;
}

.modal-result {
    margin-top: 20px;
}

.purchase-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.purchase-item-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.purchase-item-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== VIEW PRODUCT ===== */

.view-product-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.product-content-block {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.product-content-block pre {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text);
}

/* ===== FOOTER ===== */

.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 60px;
}

.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== ALERT ===== */

.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.alert-error {
    background: #FDE8E8;
    color: #C53030;
    border: 1px solid #FEB2B2;
}

.alert-success {
    background: #E6FFFA;
    color: #234E52;
    border: 1px solid #B2F5EA;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .hero h1.hero-title {
        font-size: 2.2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        gap: 24px;
        flex-direction: column;
        padding: 24px 0;
    }
    
    .hero-stat.divider {
        height: 1px;
        width: 80px;
        margin: 0 auto;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-features ul {
        grid-template-columns: 1fr;
    }

    .product-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .product-detail-footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .header .container.header-inner {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .footer .container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .checkout-product-summary {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1.hero-title {
        font-size: 1.8rem;
    }

    .hero-stats {
        gap: 16px;
    }

    .key-value {
        font-size: 1rem;
    }
}
