/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #16a34a;
    --bg: #f0f4f8;
    --white: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --radius: 12px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

/* Навбар */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}

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

/* Кнопки */
.btn-primary {
    background: var(--primary);
    color: white !important;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--primary);
    transition: all 0.2s;
    display: inline-block;
}

.btn-secondary:hover {
    background: #eff6ff;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-secondary {
    border-color: white;
    color: white;
}

.hero .btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

/* Features */
.features {
    padding: 80px 0;
}

.features h2, .demo-preview h2, .pricing h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

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

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: var(--text);
}

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

/* Демо */
.demo-preview {
    background: var(--white);
    padding: 60px 0;
}

.demo-calc {
    max-width: 600px;
    margin: 20px auto;
    display: flex;
    gap: 10px;
}

.demo-calc input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1.1rem;
    outline: none;
}

.demo-calc input:focus {
    border-color: var(--primary);
}

.result-box {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    min-height: 50px;
    font-size: 1.1rem;
    white-space: pre-wrap;
    border: 1px solid var(--border);
}

.demo-limit {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.demo-limit a {
    color: var(--primary);
}

/* Pricing */
.pricing {
    padding: 80px 0;
}

.pricing-card {
    max-width: 400px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border: 2px solid var(--primary);
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin: 20px 0;
}

.pricing-card ul {
    list-style: none;
    text-align: left;
    margin: 20px 0;
}

.pricing-card li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.pricing-card .btn-primary {
    margin-top: 20px;
    width: 100%;
}

/* Footer */
footer {
    background: var(--text);
    color: white;
    text-align: center;
    padding: 30px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Страницы входа/регистрации */
.auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.auth-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

.auth-card .btn-primary {
    width: 100%;
    margin-top: 10px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
}

.auth-link a {
    color: var(--primary);
}

/* 404 */
.error-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--primary);
}

.error-page p {
    font-size: 1.2rem;
    margin: 20px 0;
    color: var(--text-light);
}
#register-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.demo-page, .features-page, .auth-page {
    flex: 1;
}

footer {
    margin-top: auto;
}
/* Адаптив */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .nav-links { gap: 10px; }
    .features-grid { grid-template-columns: 1fr; }
    .demo-calc { flex-direction: column; }
}
/* ========== МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 768px) {
    /* Навбар */
    .navbar .container {
        flex-wrap: wrap;
        padding: 10px 15px;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 12px;
        margin-top: 8px;
        flex-wrap: wrap;
    }
    
    .nav-links a {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    /* Hero */
    .hero {
        padding: 40px 15px;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    /* Демо */
    .demo-calc {
        flex-direction: column;
    }
    
    .demo-calc input {
        width: 100%;
        font-size: 1rem;
    }
    
    .demo-calc .btn-primary {
        width: 100%;
    }
    
    /* Формы */
    .auth-card {
        padding: 20px;
        margin: 0 10px;
    }
    
    .auth-card h2 {
        font-size: 1.3rem;
    }
    
    .form-group input {
        font-size: 1rem;
        padding: 12px 14px;
    }
    
    /* Кнопки */
    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    /* Карточки */
    .payment-card, .download-card, .admin-card {
        padding: 20px;
        margin: 0 10px;
    }
    
    .price {
        font-size: 2.5rem;
    }
    
    /* Режимы калькулятора */
    .mode-selector {
        gap: 6px;
    }
    
    .mode-btn {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
    
    /* Подвал */
    footer {
        padding: 20px 10px;
        font-size: 0.8rem;
    }
    
    /* Таблицы */
    table {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.3rem;
    }
    
    .nav-links a {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .auth-card {
        padding: 15px;
    }
    
    .calc-input {
        font-size: 1rem;
    }
    .calc-result {
    overflow-x: auto;
    word-wrap: break-word;
}
}
