:root {
    --primary: #0F172A;
    --primary-hover: #1D4ED8;
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --bg: #F1F5F9;
    --surface: #FFFFFF;
    --text: #0F172A;
    --ink: #0F172A;
    --text-muted: #64748B;
    --muted: #64748B;
    --border: #E2E8F0;
    --line: #E2E8F0;
    --danger: #EF4444;
    --link: #2563EB;
    --success: #10B981;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

header {
    background: var(--primary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--surface);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

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

.nav-links a:hover {
    color: var(--accent);
    text-decoration: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--surface);
    font-size: 1.5rem;
    cursor: pointer;
}

.hero {
    padding: 100px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.code-block {
    background: var(--primary);
    color: var(--surface);
    border-radius: 12px;
    padding: 40px;
    max-width: 700px;
    margin: 50px auto;
    font-family: monospace;
    overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    color: #fff;
}

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

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

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #DC2626;
    color: #fff;
}

.btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cards {
    padding: 80px 20px;
    background: var(--surface);
}

.cards h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: var(--text);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.card {
    background: var(--surface);
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text);
}

.card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-top: 10px;
}

.timer-section {
    padding: 80px 20px;
    background: var(--surface);
    text-align: center;
}

.timer-section h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text);
}

.timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.timer-item {
    background: var(--bg);
    border-radius: 12px;
    padding: 24px 16px;
    min-width: 100px;
    border: 1px solid var(--border);
}

.timer-item .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.timer-item .label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 6px;
}

footer {
    background: var(--primary);
    color: var(--surface);
    padding: 60px 20px 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--accent);
}

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

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--text-muted);
}

.footer-col a:hover {
    color: var(--accent);
    text-decoration: none;
}

.social-links li {
    margin-bottom: 8px;
}

.footer-cta .btn {
    width: 100%;
    text-align: center;
}

.copyright {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.legal h1 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 16px;
}

.legal h2 {
    font-size: 1.25rem;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--text);
}

.legal p {
    max-width: 800px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.legal a {
    color: var(--primary);
    text-decoration: underline;
}

.legal ul {
    max-width: 800px;
    margin-left: 20px;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.legal li {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }

    .btn-outline {
        margin-left: 0;
        margin-top: 12px;
    }

    .timer-item {
        min-width: 90px;
        padding: 20px 12px;
    }

    .timer-item .value {
        font-size: 1.5rem;
    }
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.service-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 36px 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.service-list li {
    margin-bottom: 12px;
}

.service-list li:last-child {
    margin-bottom: 0;
}

.cta-section .btn-primary {
    background: var(--accent);
    color: #fff;
}

.cta-section .btn-primary:hover {
    background: var(--accent-hover);
}

/* Статусы для компилятора */
.status-success {
    color: var(--success);
    font-weight: 600;
}

.status-error {
    color: var(--danger);
    font-weight: 600;
}

.status-warning {
    color: #F59E0B;
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
}

.input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text);
}

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

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Landing page specific styles */
.btn-white {
    background: #fff;
    color: var(--ink);
}

.btn-white:hover {
    background: #F0EFE8;
}

.btn-full {
    width: 100%;
}

.btn-full-accent-dark {
    width: 100%;
    background: var(--accent-dark);
}

.btn-full-accent-dark:hover {
    background: #1D4ED8;
}

.text-muted-sm {
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-grid-landing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 24px;
}

.footer-col-landing h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--ink);
    text-align: left;
}

.footer-col-landing ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.footer-col-landing li {
    margin-bottom: 10px;
    text-align: left;
}

.footer-col-landing a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
    text-align: left;
}

.footer-col-landing a:hover {
    color: var(--accent);
    text-decoration: none;
}

.footer-cta-landing {
    margin-top: 16px;
}

.footer-btn-telegram-landing {
    background: var(--accent);
    color: #fff;
    width: auto;
    padding: 12px 20px;
    display: inline-block;
}

.copyright-landing {
    border-top: 1px solid var(--line);
    padding-top: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
}

/* Services page specific styles */
.services-hero {
    padding: 100px 20px;
}

.services-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.services-hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.services-section {
    padding: 80px 20px;
    background: var(--surface);
}

.services-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 60px;
    color: var(--text);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.service-card h3 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.service-card p.stack {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 10px;
    font-style: italic;
}

.service-card p.desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
}

.service-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #64748B;
}

.service-list li span.arrow {
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

.service-price {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.service-btn {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
}

.cta-section {
    padding: 80px 20px;
    text-align: center;
    background: var(--primary);
    color: #fff;
}

.cta-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}

.cta-section p {
    font-size: 1rem;
    color: #CBD5E1;
    max-width: 600px;
    margin: 0 auto 30px;
}

.cta-section .btn-telegram {
    background: var(--accent);
    color: #fff;
}

/* Cases page specific styles */
.cases-hero {
    padding: 80px 20px;
    text-align: center;
}

.cases-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.cases-hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.case-results {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.case-results li {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.case-results li:last-child {
    margin-bottom: 0;
}

.case-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

/* Article page specific styles */
.article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    display: block;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
}

.article-content h2 {
    font-size: 1.5rem;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text);
}

.article-content h3 {
    font-size: 1.25rem;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text);
}

.article-content p {
    margin-bottom: 16px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content pre {
    background: var(--primary);
    color: #d4d4d4;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin: 16px 0;
}

.article-content code {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    background: rgba(15, 23, 42, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.article-content pre code {
    background: none;
    padding: 0;
}

/* Toast уведомления */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 16px 24px;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    pointer-events: auto;
    animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-in 2.7s forwards;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

.toast-info {
    background: var(--accent);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Contacts page specific styles */
.contacts-hero {
    padding: 60px 20px;
}

.contacts-hero h1 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.contacts-hero p {
    color: #64748B;
    max-width: 700px;
    margin: 0 auto 40px;
}

.contacts-cards {
    padding: 80px 20px;
}

.contacts-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 2px solid var(--line);
    display: block;
}

.contact-info p {
    margin-bottom: 16px;
}

.contact-btn-telegram {
    background: var(--accent);
    color: #fff;
    width: 100%;
    text-align: center;
    padding: 14px;
}

.contact-links-div {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #0F172A;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-family: inherit;
    margin-bottom: 16px;
}

.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-family: inherit;
    margin-bottom: 16px;
}

.form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: #0F172A;
    cursor: pointer;
}

.captcha-container {
    margin-bottom: 16px;
    background: #F8FAFC;
    border-radius: 8px;
    padding: 12px;
}

.captcha-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #0F172A;
    font-size: 0.9rem;
}

.captcha-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
    font-size: 1.1rem;
    color: #0F172A;
}

.captcha-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-family: inherit;
}

.submit-btn {
    width: 100%;
    padding: 14px;
}

.form-result {
    margin-top: 16px;
    font-weight: 500;
    color: #14B8A6;
    display: none;
}

.price-note {
    margin-top: 24px;
    text-align: center;
}

.service-price-wrapper {
    margin-top: auto;
}

.privacy-link {
    color: var(--accent);
    text-decoration: underline;
}
