* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0c10;
    color: #d1d5db;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

:root {
    --bg-primary: #0a0c10;
    --bg-secondary: #12151b;
    --bg-card: #1a1e25;
    --accent: #0080ff;
    --accent-hover: #1a8cff;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --border: #2a2f38;
}

a {
    text-decoration: none;
    color: var(--accent);
    transition: color 0.2s ease;
}
a:hover {
    color: var(--accent-hover);
}

/* Шапка */
.header {
    position: sticky;
    top: 0;
    background-color: rgba(10, 12, 16, 0.92);
    backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff;
}
.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}
.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.2s, border-bottom 0.2s;
    padding-bottom: 6px;
    border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
    border-bottom-color: var(--accent);
}

.burger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
}

/* Hero */
.hero {
    padding: 80px 0 80px;
    display: flex;
    align-items: center;
    min-height: 85vh;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: #ffffff;
}
.hero-content h1 span {
    color: var(--accent);
}
.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 550px;
}
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.btn {
    display: inline-block;
    background: var(--accent);
    color: #ffffff;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    transition: background 0.25s, transform 0.15s;
    border: none;
    cursor: pointer;
    letter-spacing: 0.3px;
}
.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    color: #fff;
}
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--accent);
}
.btn-outline:hover {
    background: rgba(0, 128, 255, 0.08);
}

/* Секции */
section {
    padding: 90px 0;
}
.section-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    text-align: center;
}
.section-title span {
    color: var(--accent);
}
.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 3.5rem auto;
    font-size: 1.1rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-text h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 1rem;
}
.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}
.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}
.stat h4 {
    font-size: 2rem;
    color: var(--accent);
    font-weight: 700;
}
.stat p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.about-image {
    background: var(--bg-card);
    border-radius: 20px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 4rem;
    border: 1px solid var(--border);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.service-card {
    background: var(--bg-card);
    padding: 2.2rem 1.8rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: transform 0.2s, border-color 0.2s;
}
.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
}
.service-icon {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}
.service-card h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.8rem;
}
.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}
.contact-item i {
    font-size: 1.4rem;
    color: var(--accent);
    width: 32px;
    text-align: center;
}
.contact-item a,
.contact-item span {
    color: #e5e7eb;
    font-weight: 500;
    font-size: 1rem;
}
.contact-item small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 2px;
}
.contact-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
}
.form-group {
    margin-bottom: 1.2rem;
}
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 14px 16px;
    background: #0f1219;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border 0.2s;
}
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}
textarea {
    resize: vertical;
    min-height: 110px;
}
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1.5rem;
}
.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}
.checkbox-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.checkbox-group label a {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 500;
}
.checkbox-group label a:hover {
    color: var(--accent-hover);
}
.form-btn {
    width: 100%;
    padding: 14px;
    font-weight: 600;
    font-size: 1rem;
}

.footer {
    border-top: 1px solid var(--border);
    padding: 30px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer a {
    color: var(--accent);
}

/* Cookie-баннер */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(18, 21, 27, 0.98);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    padding: 18px 24px;
    z-index: 9999;
    display: none;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
}
.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.cookie-text {
    flex: 1 1 500px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}
.cookie-text a {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 500;
}
.cookie-text a:hover {
    color: var(--accent-hover);
}
.cookie-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.cookie-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.cookie-btn:hover {
    background: var(--accent-hover);
}
.cookie-btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}
.cookie-btn-outline:hover {
    background: rgba(255,255,255,0.05);
}

/* Политика конфиденциальности */
.policy-section {
    padding: 60px 0 80px;
}
.policy-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 36px;
    margin-top: 24px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.policy-card h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}
.policy-card h1 span {
    color: var(--accent);
}
.updated {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}
.policy-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin: 2rem 0 1rem;
    border-left: 4px solid var(--accent);
    padding-left: 16px;
}
.policy-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 1.5rem 0 0.8rem;
}
.policy-card p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}
.policy-card ul {
    margin: 0.8rem 0 1.2rem 1.5rem;
    color: var(--text-secondary);
}
.policy-card li {
    margin-bottom: 0.5rem;
}
.policy-card strong {
    color: #ffffff;
}
.contact-block {
    background: #0f1219;
    border-radius: 10px;
    padding: 20px;
    margin-top: 1rem;
}
.contact-block .contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}
.contact-block .contact-item i {
    color: var(--accent);
    width: 20px;
    text-align: center;
}
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0 50px;
        min-height: auto;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .hero-content h1 {
        font-size: 2.4rem;
    }
    .terminal {
        max-width: 100%;
    }
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        width: 100%;
        background: rgba(10,12,16,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        gap: 1.8rem;
        padding: 2rem 0;
        display: none;
    }
    .nav-links.active {
        display: flex;
    }
    .burger {
        display: block;
    }
    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .about-stats {
        flex-wrap: wrap;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===== Редактор C++ ===== */
.cpp-ide {
    background: #1e1e2e;
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 128, 255, 0.06);
    overflow: hidden;
    font-family: 'Consolas', 'Courier New', monospace;
}
.ide-header {
    background: #2a2a3a;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3a3a4a;
}
.ide-title {
    color: #c0c0d0;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.ide-buttons {
    display: flex;
    gap: 10px;
}
.ide-btn {
    color: #9090a0;
    font-size: 0.9rem;
    cursor: default;
    line-height: 1;
}
.ide-btn.close:hover {
    color: #ff6b6b;
}
.ide-body {
    padding: 16px 20px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #d4d4dc;
    background: #1e1e2e;
}
.code-line {
    display: flex;
    gap: 12px;
}
.line-number {
    color: #555570;
    min-width: 20px;
    text-align: right;
    user-select: none;
}
/* C++ подсветка */
.keyword {
    color: #569cd6;       /* синий: int, return */
    font-weight: 600;
}
.function {
    color: #dcdcaa;       /* жёлтый: main, cout, endl, Connect */
}
.preprocessor {
    color: #c586c0;       /* фиолетовый: #include */
}
.string {
    color: #ce9178;       /* оранжевый: "Hello, Wolfein!" */
}
.number {
    color: #b5cea8;       /* светло-зелёный: 0 */
}
.namespace {
    color: #4ec9b0;       /* бирюзовый: std, Wolfein */
}

/* Страница ошибок */
.error-section {
    padding: 100px 0 120px;
    display: flex;
    align-items: center;
    min-height: 80vh;
}

.error-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    opacity: 0.8;
    margin-bottom: 0.5rem;
    letter-spacing: -3px;
}

.error-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.error-message {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.error-hint {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    background: rgba(0, 128, 255, 0.05);
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 3px solid var(--accent);
    text-align: left;
    display: inline-block;
}

.error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 576px) {
    .error-code {
        font-size: 5rem;
    }
    .error-card {
        padding: 35px 25px;
    }
    .error-title {
        font-size: 1.6rem;
    }
}