* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fira Code', monospace;
}

body {
    background-color: #0e0e0e;
    color: #f1f1f1;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ---------- НАВИГАЦИЯ ---------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #111;
    border-bottom: 1px solid #333;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.logo {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    letter-spacing: 1.5px;
    font-weight: 500;
}
.logo span {
    color: #fff;
    background: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

/* Бургер-меню */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #aaa;
    border-radius: 2px;
    transition: 0.3s;
}

.nav-menu {
    display: flex;
    gap: 20px;
}
.nav-menu a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s;
    padding: 8px 0;
}
.nav-menu a:hover {
    color: #00ff7f;
}

/* ---------- HERO ---------- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 120px 20px 80px;
    gap: 40px;
    text-align: center;
}

.hero-text {
    max-width: 600px;
    text-align: center;
}
.hero-text h1 {
    font-size: clamp(2.2rem, 7vw, 3rem);
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero-text p {
    font-size: clamp(1rem, 4vw, 1.1rem);
    color: #ccc;
    margin-bottom: 24px;
    max-width: 500px;
}

.btn {
    background: white;
    color: black;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-height: 48px;
    text-decoration: none;
    display: inline-block;
}
.btn:hover {
    background: #00ff7f;
    color: black;
    transform: translateY(-2px);
}
.btn-secondary {
    background: #1a1a1a;
    border: 1px solid #00ff7f;
    color: #00ff7f;
}
.btn-secondary:hover {
    background: #00ff7f;
    color: black;
    transform: translateY(-2px);
}

.animated-terminal {
    background: #1a1a1a;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0,255,127,0.1);
    border: 1px solid #333;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.terminal-header {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 12px;
    align-self: flex-start;
}
pre {
    color: #00ff7f;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.4;
    text-align: left;
    width: 100%;
}

/* ---------- УСЛУГИ ---------- */
.services-section {
    padding: 100px 20px;
    text-align: center;
}
.services-section h2 {
    font-size: clamp(2rem, 6vw, 2.5rem);
    margin-bottom: 50px;
}

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

.service-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 24px;
    text-align: left;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.service-card h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.15rem;
}
.service-card p {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
}

.service-card::before {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.07), transparent);
    transition: top 0.4s ease;
}
.service-card:hover::before {
    top: 0;
}
.service-card:hover {
    transform: translateY(-8px);
    border-color: #00ff7f;
    box-shadow: 0 10px 25px rgba(0,255,127,0.15);
}

/* Плюс-карточка */
.plus-card {
    background: #fff;
    color: #000;
    border: none;
    font-size: 3rem;
    font-weight: bold;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.plus-card:hover {
    transform: translateY(-8px) scale(1.05);
    background: #00ff7f;
    box-shadow: 0 10px 25px rgba(0,255,127,0.15);
}

/* ---------- ОТЗЫВЫ ---------- */
.reviews-section {
    padding: 100px 20px;
    text-align: center;
    position: relative;
}
.reviews-section h2 {
    font-size: clamp(2rem, 6vw, 2.5rem);
    margin-bottom: 50px;
}

.reviews-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 60px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}
.reviews-container::-webkit-scrollbar {
    display: none;
}

.review-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 24px;
    min-width: 280px;
    max-width: 320px;
    text-align: left;
    scroll-snap-align: start;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}
.review-card:hover {
    transform: translateY(-8px);
    border-color: #00ff7f;
    box-shadow: 0 10px 25px rgba(0,255,127,0.15);
}

.review-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #00ff7f;
}

.review-card h3 {
    color: #fff;
    font-size: 1.1rem;
}
.review-card p {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
}

.review-nav-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.review-nav {
    background: rgba(0, 255, 127, 0.2);
    border: 1px solid #00ff7f;
    color: #00ff7f;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.review-nav:hover {
    background: #00ff7f;
    color: #000;
}

/* ---------- ПОРТФОЛИО ---------- */
.portfolio-section {
    padding: 100px 20px;
    text-align: center;
}
.portfolio-section h2 {
    font-size: clamp(2rem, 6vw, 2.5rem);
    margin-bottom: 10px;
}

.portfolio-subtitle {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 40px;
    font-style: italic;
}

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

.portfolio-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 24px;
    text-align: left;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.portfolio-card h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.15rem;
}
.portfolio-card p {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
}

.portfolio-card::before {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.07), transparent);
    transition: top 0.4s ease;
}
.portfolio-card:hover::before {
    top: 0;
}
.portfolio-card:hover {
    transform: translateY(-8px);
    border-color: #00ff7f;
    box-shadow: 0 10px 25px rgba(0,255,127,0.15);
}

/* Иконки технологий */
.tech-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.tech-icon.telegram { background: #0088cc; }
.tech-icon.whatsapp { background: #25d366; }
.tech-icon.js { background: #f7df1e; color: #000; }

/* ---------- КОНТАКТЫ ---------- */
.contact-section {
    padding: 100px 20px;
    text-align: center;
}
.contact-section h2 {
    font-size: clamp(2rem, 6vw, 2.5rem);
    margin-bottom: 20px;
}

/* Подзаголовок перед формой */
.contact-form-subtitle {
    font-size: clamp(1rem, 4vw, 1.1rem);
    color: #ccc;
    margin: 0 auto 40px;
    max-width: 600px;
    text-align: center;
    font-weight: 400;
}

/* Статистика — с увеличенными отступами */
.stats-section {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 80px auto 70px; /* 80px сверху, 70px снизу */
    flex-wrap: wrap;
    max-width: 1000px;
    padding: 0 20px;
}
.stat-item {
    text-align: center;
    padding: 20px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    min-width: 140px;
    transition: all 0.3s ease;
}
.stat-item:hover {
    transform: translateY(-8px);
    border-color: #00ff7f;
    box-shadow: 0 10px 25px rgba(0,255,127,0.15);
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 600;
    color: #00ff7f;
    margin-bottom: 8px;
}
.stat-label {
    color: #aaa;
    font-size: 0.9rem;
}

.contact-form {
    max-width: 500px;
    margin: 0 auto 80px; /* 80px снизу */
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-group {
    text-align: left;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 0.9rem;
}
.form-input {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-family: 'Fira Code', monospace;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input:focus {
    border-color: #00ff7f;
    outline: none;
    box-shadow: 0 0 10px rgba(0,255,127,0.2);
}
.form-input[type="text"],
.form-input[type="email"] {
    height: 40px;
}
.form-input[type="textarea"] {
    min-height: 100px;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    overflow-y: auto;
    max-width: 100%;
}

/* Жёстко фиксируем textarea */
.contact-form .form-group:nth-child(3) .form-input,
.contact-form textarea {
    resize: vertical !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

.flash-message {
    margin: 15px auto;
    padding: 12px;
    border-radius: 6px;
    max-width: 500px;
    text-align: center;
    font-size: 0.9rem;
}
.flash-message.success {
    background: rgba(0,255,127,0.2);
    color: #00ff7f;
    border: 1px solid #00ff7f;
}
.flash-message.error {
    background: rgba(255,85,85,0.2);
    color: #ff5555;
    border: 1px solid #ff5555;
}

/* Успешная отправка */
#successMessage {
    display: none;
    text-align: center;
    padding: 50px 20px;
    animation: fadeInUp 0.6s ease-out;
}
#successMessage .success-icon {
    font-size: 4rem;
    color: #00ff7f;
    margin-bottom: 16px;
}
#successMessage h3 {
    color: #00ff7f;
    margin-bottom: 12px;
}
#successMessage p {
    color: #ccc;
    font-size: 1rem;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Анимация при скролле */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- АДМИН-ПАНЕЛЬ ---------- */
.admin-login,
.admin-panel {
    padding: 120px 20px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}
.admin-login h2,
.admin-panel h2 {
    font-size: clamp(2rem, 6vw, 2.5rem);
    margin-bottom: 30px;
    color: #fff;
}
.admin-form {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
}
.admin-table th,
.admin-table td {
    padding: 20px;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid #333;
}
.admin-table th {
    background: #111;
    color: #00ff7f;
    font-weight: 600;
}
.admin-table td {
    color: #ccc;
}
.admin-table tr:hover {
    background: rgba(0,255,127,0.1);
}
.admin-table td:last-child {
    word-break: break-word;
}
.no-contacts {
    color: #aaa;
    font-size: 1rem;
    margin: 30px 0;
}
.admin-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* ---------- МОДАЛЬНЫЕ ОКНА ---------- */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    padding: 20px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.show {
    display: flex;
    opacity: 1;
}
.modal-content {
    background-color: #1a1a1a;
    margin: auto;
    padding: 24px;
    border: 1px solid #333;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}
.modal.show .modal-content {
    transform: scale(1);
}
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
    text-align: left;
}
.modal-text {
    text-align: left;
}
.modal-text h2 {
    font-size: clamp(1.5rem, 5vw, 1.8rem);
    margin-bottom: 16px;
    color: #fff;
}
.modal-text p {
    color: #ccc;
    margin-bottom: 16px;
    font-size: 0.95rem;
}
.modal-text .price {
    color: #00ff7f;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 24px;
}
.modal-btn {
    min-height: 48px;
    padding: 14px 32px;
    font-size: 1rem;
    text-decoration: none;
    background: white;
    color: black;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}
.modal-btn:hover {
    background: #00ff7f;
    color: black;
    transform: translateY(-2px);
}
.close {
    color: #aaa;
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}
.close:hover {
    color: #00ff7f;
}

/* ---------- ФУТЕР ---------- */
footer {
    text-align: center;
    padding: 40px 20px;
    background: #111;
    color: #aaa;
    font-size: 0.9rem;
}
.footer-links {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-link {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}
.footer-link:hover {
    color: #00ff7f;
}
.footer-link i {
    font-size: 1.1rem;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (min-width: 699px) {
    .service-grid,
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero {
        flex-direction: row;
        text-align: left;
        padding: 140px 40px;
        justify-content: space-around;
    }
    .hero-text {
        max-width: 500px;
        text-align: left;
    }
    .animated-terminal {
        max-width: 450px;
        margin: 0;
    }
    .modal-body {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
    }
    .reviews-container {
        padding: 20px 80px;
    }
    .review-nav-container {
        gap: 30px;
        margin-top: 30px;
    }
    .portfolio-section,
    .contact-section,
    .admin-login,
    .admin-panel {
        padding: 120px 40px;
    }
}

@media (min-width: 1024px) {
    .service-grid,
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .navbar {
        padding: 20px 50px;
    }
    .hero {
        padding: 160px 50px;
        justify-content: space-around;
    }
    .services-section h2,
    .reviews-section h2,
    .portfolio-section h2,
    .contact-section h2,
    .admin-login h2,
    .admin-panel h2 {
        text-align: center;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    .reviews-container {
        padding: 20px 100px;
    }
    .review-nav-container {
        gap: 40px;
        margin-top: 40px;
    }
    .portfolio-section,
    .contact-section,
    .admin-login,
    .admin-panel {
        padding: 140px 50px;
    }
    .admin-table th,
    .admin-table td {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: #111;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transition: left 0.3s ease;
        z-index: 99;
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-menu a {
        font-size: 1.2rem;
        padding: 16px;
        width: 100%;
        text-align: center;
    }
    .reviews-container {
        padding: 20px 40px;
    }
    .review-nav-container {
        gap: 15px;
        margin-top: 15px;
    }
    .portfolio-section,
    .contact-section,
    .admin-login,
    .admin-panel {
        padding: 80px 20px;
    }
    .admin-table {
        font-size: 0.85rem;
    }
    .admin-table th,
    .admin-table td {
        padding: 12px;
    }
    .stats-section {
        gap: 20px;
        margin: 60px auto 50px;
    }
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px; /* высота логотипа */
    width: auto;  /* сохраняет пропорции */
}
