/* =====================================================
   AutoPost24 — Главен stylesheet
   Тъмна тема, лилаво/циан акценти (по дизайна)
   ===================================================== */

:root {
    --bg-darker: #0a0719;
    --bg: #0e0a1f;
    --bg-card: #1a1432;
    --bg-card-hover: #221a40;
    --border: #2d2350;
    --border-light: #3a2f6b;
    --text: #e8e6f5;
    --text-muted: #a8a3c8;
    --text-dim: #7e7aa0;
    --accent-purple: #7c5cff;
    --accent-cyan: #4dd6ff;
    --accent-pink: #ff5cb8;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --gradient: linear-gradient(135deg, #7c5cff 0%, #4dd6ff 100%);
    --gradient-pink: linear-gradient(135deg, #7c5cff 0%, #ff5cb8 100%);
    --shadow-glow: 0 0 40px rgba(124, 92, 255, 0.25);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--accent-purple); text-decoration: none; }
a:hover { color: var(--accent-cyan); }
img { max-width: 100%; display: block; }

/* =====================================================
   Layout
   ===================================================== */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =====================================================
   Header
   ===================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(14, 10, 31, 0.8);
    border-bottom: 1px solid var(--border);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text);
}
.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -0.5px;
}
.brand-text { font-weight: 700; }
.brand-text .accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
    transition: color .2s;
}
.nav a:hover { color: var(--text); }
.nav .btn { color: #fff; }

/* =====================================================
   Buttons
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: 0;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}
.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 92, 255, .35);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(124, 92, 255, .55);
    color: #fff;
}
.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-light);
}
.btn-secondary:hover {
    background: var(--bg-card);
    color: var(--text);
}
.btn-ghost {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-card-hover); color: var(--text); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-danger { background: #4a1d1d; color: #ffb4b4; border: 1px solid #6b2a2a; }

/* =====================================================
   Hero
   ===================================================== */
.hero {
    position: relative;
    padding: 80px 0 100px;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 92, 255, .25), transparent 60%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(77, 214, 255, .15), transparent 60%);
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(124, 92, 255, .12);
    border: 1px solid rgba(124, 92, 255, .35);
    color: var(--accent-purple);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}
.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-purple);
    box-shadow: 0 0 8px var(--accent-purple);
}
.hero h1 {
    font-size: 56px;
    line-height: 1.1;
    font-weight: 800;
    margin: 0 0 20px;
    letter-spacing: -1.5px;
}
.hero h1 .accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p.lead {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 0 32px;
}
.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.hero-note {
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-dim);
}

/* Hero mockup */
.hero-mockup {
    position: relative;
    perspective: 1500px;
}
.mockup-window {
    background: #0a0719;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: 0 30px 60px rgba(0,0,0,.4), 0 0 80px rgba(124, 92, 255, .15);
}
.mockup-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}
.mockup-dot {
    width: 11px; height: 11px; border-radius: 50%;
}
.mockup-dot.r { background: #ff5f57; }
.mockup-dot.y { background: #ffbd2e; }
.mockup-dot.g { background: #28c940; }
.mockup-url {
    flex: 1;
    margin-left: 12px;
    background: #16112c;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-dim);
    border: 1px solid var(--border);
}
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}
.stat-card .label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
.stat-card .num { font-size: 22px; font-weight: 700; margin-top: 4px; }
.stat-card .delta { font-size: 12px; color: var(--success); font-weight: 600; margin-top: 2px; }
.posts-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}
.posts-list h4 { margin: 0 0 10px; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.posts-list ul { list-style: none; padding: 0; margin: 0; }
.posts-list li { font-size: 13px; padding: 6px 0; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.posts-list li::before { content: '•'; color: var(--accent-purple); font-size: 18px; }

.notif {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.notif-1 { top: -16px; left: 16px; color: var(--success); }
.notif-2 { top: 80px; right: -20px; color: var(--accent-cyan); }
.notif-3 { bottom: 70px; left: 30px; color: var(--accent-purple); }

/* =====================================================
   Sections
   ===================================================== */
section {
    padding: 80px 0;
}
.section-head {
    text-align: center;
    margin-bottom: 50px;
}
.section-head h2 {
    font-size: 40px;
    font-weight: 800;
    margin: 0 0 14px;
    letter-spacing: -1px;
}
.section-head p {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 640px;
    margin: 0 auto;
}

/* =====================================================
   Features Grid (на landing page)
   ===================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
}
.feature-card .feature-icon {
    font-size: 36px;
    margin-bottom: 14px;
    line-height: 1;
}
.feature-card h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
}
.feature-card p {
    color: var(--text-muted);
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

@media (max-width: 920px) {
    .features-grid { grid-template-columns: 1fr; gap: 14px; }
    .feature-card { padding: 24px 20px; }
    .feature-card h3 { font-size: 16px; }
    .feature-card p { font-size: 14px; }
}

/* =====================================================
   Pricing
   ===================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}
/* 4-колонна решетка (за landing page) — само на десктоп.
   На mobile media query-та по-долу връщат в 1 колона. */
@media (min-width: 921px) {
    .pricing-grid--four { grid-template-columns: repeat(4, 1fr); }
}
.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    position: relative;
    display: flex;
    flex-direction: column;
}
.price-card.featured {
    border: 2px solid transparent;
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        var(--gradient) border-box;
    transform: scale(1.02);
    box-shadow: 0 20px 60px rgba(124, 92, 255, .25);
}
.price-card .badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: #fff;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.price-card h3 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
}
.price-card .price {
    margin: 0 0 6px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.price-card .price .amount {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1.5px;
}
.price-card .price .currency {
    font-size: 22px;
    color: var(--text-muted);
    font-weight: 600;
}
.price-card .period {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 22px;
}
.price-card ul.features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    flex-grow: 1;
}
.price-card ul.features li {
    padding: 8px 0;
    color: var(--text-muted);
    font-size: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.price-card ul.features li::before {
    content: '✓';
    color: var(--accent-purple);
    font-weight: 700;
    flex-shrink: 0;
}

/* =====================================================
   CTA Banner
   ===================================================== */
.cta-banner {
    padding: 80px 0;
    background: linear-gradient(135deg, #4a2bff 0%, #2a1b9c 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-banner h2 {
    font-size: 44px;
    margin: 0 0 16px;
    color: #fff;
    font-weight: 800;
}
.cta-banner p {
    color: rgba(255,255,255,.85);
    font-size: 17px;
    margin: 0 0 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.cta-banner .btn-white {
    background: #fff;
    color: var(--accent-purple);
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 999px;
    display: inline-flex;
}
.cta-banner .btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.cta-note {
    margin-top: 14px;
    color: rgba(255,255,255,.65);
    font-size: 13px;
}

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
    background: var(--bg-darker);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}
.footer-brand p {
    color: var(--text-muted);
    margin: 16px 0;
    max-width: 360px;
    font-size: 15px;
}
.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}
.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all .2s;
}
.footer-socials a:hover {
    background: var(--accent-purple);
    color: #fff;
}
.footer-col h4 {
    font-size: 14px;
    color: var(--text);
    margin: 0 0 16px;
    font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
    color: var(--text-muted);
    font-size: 14px;
    transition: color .2s;
}
.footer-col ul a:hover { color: var(--text); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
    font-size: 13px;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--text-dim); }

/* =====================================================
   Floating social bar (right side)
   ===================================================== */
.social-bar {
    position: fixed;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 30;
}
.social-bar a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
    transition: transform .2s;
}
.social-bar a:hover { transform: scale(1.1); }
.social-bar .fb { background: #1877f2; }
.social-bar .ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-bar .tg { background: #2aabee; }

/* =====================================================
   Forms (login, register)
   ===================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: radial-gradient(ellipse at top, rgba(124, 92, 255, .15), transparent), var(--bg);
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.auth-card h1 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 800;
}
.auth-card p.lead {
    color: var(--text-muted);
    margin: 0 0 28px;
    font-size: 15px;
}
.auth-card .brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    text-decoration: none;
}
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border .15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-purple);
}
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { resize: vertical; min-height: 110px; }

.form-error {
    background: rgba(248, 113, 113, .1);
    border: 1px solid rgba(248, 113, 113, .35);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}
.form-success {
    background: rgba(52, 211, 153, .1);
    border: 1px solid rgba(52, 211, 153, .35);
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim);
    font-size: 13px;
    margin: 22px 0;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-footer {
    text-align: center;
    margin-top: 22px;
    color: var(--text-muted);
    font-size: 14px;
}

/* =====================================================
   Responsive — Mobile-first optimization
   Breakpoints:
     - 1024px: tablet landscape
     - 768px:  tablet portrait
     - 480px:  large phone
     - 360px:  small phone
   ===================================================== */

/* =====================================================
   Override на inline grid стилове (forces 1 col на mobile)
   ===================================================== */
@media (max-width: 768px) {
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: 1fr 2fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* iOS / Safari fixes */
@supports (-webkit-touch-callout: none) {
    /* Предотвратява автоматичния zoom при focus на input на iOS */
    input, select, textarea {
        font-size: 16px !important;
    }
    /* Smooth scrolling на iOS */
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Touch targets (минимум 44x44 според Apple HIG / 48x48 според Google) */
@media (hover: none) and (pointer: coarse) {
    .btn, button, a.btn, .nav a {
        min-height: 44px;
    }
    .form-control {
        min-height: 48px;
    }
}

/* =====================================================
   Tablet landscape (≤1024px)
   ===================================================== */
@media (max-width: 1024px) {
    .container { max-width: 100%; padding: 0 24px; }
    .hero h1 { font-size: 48px; }
    .pricing-grid { gap: 16px; }
    .footer-grid { gap: 36px; }
}

/* =====================================================
   Tablet portrait (≤920px)
   ===================================================== */
@media (max-width: 920px) {
    .hero { padding: 60px 0 80px; }
    .hero h1 { font-size: 38px; line-height: 1.15; }
    .hero p.lead { font-size: 16px; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-mockup { display: none; }  /* скриваме мокапа на mobile */
    .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .price-card.featured { transform: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-brand p { max-width: 100%; }
    .nav { gap: 10px; }
    .nav a:not(.btn):not(.nav-login) { display: none; }  /* hide all nav links except Login */
    .nav-login {
        padding: 9px 16px;
        border-radius: 6px;
        background: var(--bg-card);
        border: 1px solid var(--border-light);
        color: var(--text) !important;
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
    }
    .nav-login:hover { background: var(--bg-card-hover); }
    .section-head h2 { font-size: 28px; }
    .section-head p { font-size: 15px; }
    .cta-banner { padding: 60px 0; }
    .cta-banner h2 { font-size: 28px; }
    .cta-banner p { font-size: 15px; }
    .social-bar { display: none; }
    section { padding: 60px 0; }
}

/* =====================================================
   Large phone (≤480px)
   ===================================================== */
@media (max-width: 480px) {
    .container { padding: 0 16px; }

    /* Header */
    .site-header .container { height: 64px; }
    .brand { gap: 8px; font-size: 17px; }
    .brand-logo { width: 34px; height: 34px; font-size: 13px; }

    /* Hero */
    .hero { padding: 40px 0 60px; }
    .hero h1 { font-size: 30px; letter-spacing: -1px; }
    .hero p.lead { font-size: 15px; margin-bottom: 24px; }
    .hero-cta { flex-direction: column; gap: 10px; }
    .hero-cta .btn { width: 100%; justify-content: center; }
    .hero-badge { font-size: 12px; padding: 6px 12px; }

    /* Sections */
    section { padding: 40px 0; }
    .section-head { margin-bottom: 32px; }
    .section-head h2 { font-size: 24px; line-height: 1.25; }
    .section-head p { font-size: 14px; }

    /* Pricing */
    .price-card { padding: 28px 22px; }
    .price-card .price .amount { font-size: 40px; }

    /* CTA banner */
    .cta-banner { padding: 50px 0; }
    .cta-banner h2 { font-size: 24px; }
    .cta-banner .btn-white { padding: 14px 28px; font-size: 15px; }

    /* Footer */
    .site-footer { padding: 40px 0 24px; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 14px; }
    .footer-bottom-links { flex-wrap: wrap; justify-content: center; gap: 14px; }

    /* Buttons */
    .btn { padding: 12px 20px; font-size: 14px; }
    .btn-lg { padding: 14px 24px; font-size: 15px; }

    /* Auth pages (login, register, install) */
    .auth-card { padding: 28px 20px; border-radius: 12px; }
    .auth-card h1 { font-size: 22px; }
    .auth-page { padding: 20px 12px; }

    /* Forms */
    .form-control { padding: 14px; font-size: 16px; /* prevent iOS zoom */ }
    .form-group label { font-size: 14px; }
}

/* =====================================================
   Small phone (≤360px)
   ===================================================== */
@media (max-width: 360px) {
    .hero h1 { font-size: 26px; }
    .section-head h2 { font-size: 22px; }
    .price-card .price .amount { font-size: 36px; }
    .nav .btn { padding: 8px 14px; font-size: 13px; }
}

/* =====================================================
   Landscape phone — компактен mode
   ===================================================== */
@media (max-height: 480px) and (orientation: landscape) {
    .hero { padding: 30px 0; }
    .auth-page { min-height: auto; padding: 30px 20px; }
}

/* =====================================================
   Print styles
   ===================================================== */
@media print {
    .site-header, .site-footer, .social-bar, .wa-floating { display: none !important; }
    body { background: #fff; color: #000; }
}
