* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --bg: #0a0a18;
    --bg-2: #120e28;
    --card: #1a1438;
    --purple: #7c5cfc;
    --purple-2: #9b7fff;
    --text: #e8e4ff;
    --muted: #9b95c4;
    --border: #2a2150;
}

html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100%;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: radial-gradient(ellipse at top, #1a1038 0%, #0a0a18 60%);
    color: var(--text);
    line-height: 1.8;
    font-size: 14px;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ========== TOPBAR ========== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(10,10,24,.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 8px;
    flex-wrap: nowrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.brand-icon { font-size: 20px; }
.brand-accent { color: var(--purple-2); }

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.nav a {
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 11px;
    transition: all .2s;
    white-space: nowrap;
}
.nav a:hover { color: var(--text); background: rgba(124,92,252,.1); }

.btn-primary {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6d4cfc, #8b6fff);
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    transition: all .2s;
    box-shadow: 0 2px 10px rgba(124,92,252,.3);
    white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); }

.btn-outline {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--purple);
    color: var(--purple-2);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    transition: all .2s;
    white-space: nowrap;
}
.btn-outline:hover { background: rgba(124,92,252,.15); }

.btn-large { padding: 14px 24px; font-size: 14px; border-radius: 12px; width: 100%; text-align: center; }
.btn-sm { padding: 5px 10px; font-size: 11px; }

/* ========== HERO ========== */
.hero {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px 30px;
    text-align: center;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(34,197,94,.1);
    border: 1px solid rgba(34,197,94,.3);
    color: #4ade80;
    font-size: 11px;
    margin-bottom: 20px;
}
.dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #22c55e;
    animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.hero-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 20%, #9b7fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hero-sub {
    font-size: 18px;
    color: var(--purple-2);
    margin-bottom: 16px;
    font-weight: 600;
}

.hero-desc {
    color: var(--muted);
    font-size: 13px;
    max-width: 500px;
    margin: 0 auto 28px;
    line-height: 1.9;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
    margin: 0 auto;
}

/* ========== FEATURES ========== */
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 900px;
    margin: 30px auto;
    padding: 0 16px;
}

.feature {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: all .3s;
}
.feature:hover { border-color: var(--purple); transform: translateY(-2px); }
.feature-icon { font-size: 34px; margin-bottom: 8px; }
.feature h3 { font-size: 15px; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: 12px; }

/* ========== STATS ========== */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 700px;
    margin: 30px auto;
    padding: 0 16px;
}
.stat {
    text-align: center;
    padding: 18px 10px;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
}
.stat-num { font-size: 22px; font-weight: 800; color: var(--purple-2); }
.stat-lbl { color: var(--muted); font-size: 11px; margin-top: 4px; }

/* ========== PAGE HEAD ========== */
.page-head {
    text-align: center;
    padding: 30px 20px 20px;
}
.page-head h1 {
    font-size: 26px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #fff, #9b7fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-head p { color: var(--muted); font-size: 13px; }

/* ========== PACKAGES ========== */
.packages-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 1000px;
    margin: 20px auto 40px;
    padding: 0 16px;
}
.package-card {
    background: linear-gradient(160deg, #1a1438, #120e28);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 18px;
    text-align: center;
    transition: all .3s;
}
.package-card:hover {
    border-color: var(--purple);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(124,92,252,.2);
}
.package-icon { font-size: 38px; margin-bottom: 12px; }
.package-card h3 { font-size: 15px; margin-bottom: 8px; }
.package-card p { color: var(--muted); font-size: 12px; margin-bottom: 14px; line-height: 1.7; }
.package-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--purple-2);
    margin-bottom: 14px;
}
.btn-buy { width: 100%; }

/* ========== AUTH ========== */
.auth-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 75vh;
    padding: 24px 16px;
}
.auth-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px 22px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.auth-box h2 { font-size: 22px; margin-bottom: 6px; }
.brand-large {
    font-size: 22px;
    justify-content: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-large .brand-icon { font-size: 28px; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 11px; margin-top: 18px; }

/* Google button */
.g_id_signin {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.g_id_signin iframe {
    max-width: 100% !important;
    border-radius: 100px !important;
}

/* ========== CHAT ========== */
.chat-wrap {
    max-width: 720px;
    margin: 16px auto;
    padding: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 78vh;
    height: 78dvh;
}
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(10,10,24,.6);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}
.chat-title span { font-size: 24px; }
.chat-status {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
}
.msg {
    display: flex;
    gap: 8px;
    max-width: 92%;
}
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar { font-size: 18px; flex-shrink: 0; }
.msg-bubble {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(124,92,252,.18);
    border: 1px solid rgba(124,92,252,.25);
    font-size: 13px;
    word-wrap: break-word;
    line-height: 1.7;
}
.msg.user .msg-bubble {
    background: linear-gradient(135deg, #6d4cfc, #8b6fff);
    border: none;
}
.chat-input {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--border);
    background: rgba(10,10,24,.6);
    flex-shrink: 0;
}
.chat-input input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(10,10,24,.8);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    min-width: 0;
}
.chat-input input:focus { border-color: var(--purple); }
.chat-input button {
    padding: 10px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6d4cfc, #8b6fff);
    border: none;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Chat Float */
.chat-float {
    position: fixed;
    bottom: 16px;
    left: 16px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6d4cfc, #8b6fff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 6px 20px rgba(124,92,252,.5);
    transition: all .3s;
}
.chat-float:hover { transform: scale(1.08); }
.chat-badge {
    position: absolute;
    top: -4px;
    right: -14px;
    background: var(--bg-2);
    color: var(--purple-2);
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 100px;
    border: 1px solid var(--purple);
    white-space: nowrap;
}

/* ========== DASHBOARD ========== */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 900px;
    margin: 20px auto 40px;
    padding: 0 16px;
}
.dash-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: all .3s;
}
.dash-card:hover { border-color: var(--purple); transform: translateY(-2px); }
.dash-icon { font-size: 30px; margin-bottom: 8px; }
.dash-card h3 { margin-bottom: 4px; font-size: 15px; }
.dash-card p { color: var(--muted); font-size: 12px; }

/* Orders */
.orders-list { max-width: 800px; margin: 20px auto; padding: 0 16px; }
.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 12px;
    gap: 8px;
    flex-wrap: wrap;
}
.order-status { color: var(--purple-2); font-size: 11px; }

/* ========== TICKET ========== */
.ticket-wrap { max-width: 800px; margin: 20px auto; padding: 0 16px; }
.ticket-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.ticket-form input,
.ticket-form textarea {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    resize: vertical;
}
.ticket-form input:focus,
.ticket-form textarea:focus { border-color: var(--purple); }
.ticket-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}
.ticket-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
}
.badge {
    background: rgba(34,197,94,.15);
    color: #4ade80;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 10px;
}

/* ========== FOOTER ========== */
.footer {
    border-top: 1px solid var(--border);
    margin-top: 50px;
    padding: 30px 16px 15px;
    background: rgba(10,10,24,.5);
}
.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
}
.footer-col h4 { margin-bottom: 10px; font-size: 14px; }
.footer-col a, .footer-col p {
    color: var(--muted);
    font-size: 12px;
    display: block;
    margin-bottom: 6px;
}
.footer-col a:hover { color: var(--purple-2); }
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}

/* ========== TABLET/DESKTOP ========== */
@media (min-width: 640px) {
    .topbar { padding: 16px 40px; }
    .brand { font-size: 20px; gap: 10px; }
    .brand-icon { font-size: 26px; }
    .nav a { font-size: 14px; padding: 8px 16px; border-radius: 10px; }
    .btn-primary, .btn-outline { padding: 10px 22px; font-size: 14px; border-radius: 12px; }
    .btn-large { padding: 14px 32px; font-size: 16px; width: auto; text-align: center; }

    .hero { padding: 80px 24px 60px; }
    .hero-title { font-size: 64px; }
    .hero-sub { font-size: 28px; }
    .hero-desc { font-size: 16px; }
    .hero-buttons { flex-direction: row; justify-content: center; max-width: none; gap: 16px; }

    .features { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
    .feature { padding: 28px; }
    .feature-icon { font-size: 40px; }
    .feature h3 { font-size: 18px; }
    .feature p { font-size: 14px; }

    .stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
    .stat { padding: 24px; }
    .stat-num { font-size: 32px; }
    .stat-lbl { font-size: 14px; }

    .page-head { padding: 60px 24px 30px; }
    .page-head h1 { font-size: 40px; }
    .page-head p { font-size: 15px; }

    .packages-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; padding: 0 24px; }
    .package-card { padding: 32px 24px; }
    .package-icon { font-size: 48px; }
    .package-card h3 { font-size: 18px; min-height: 56px; }
    .package-card p { font-size: 13px; min-height: 60px; }
    .package-price { font-size: 24px; }

    .auth-box { padding: 48px 40px; }
    .auth-box h2 { font-size: 26px; }
    .brand-large { font-size: 28px; }

    .chat-wrap { margin: 40px auto; height: 600px; }
    .chat-header { padding: 16px 20px; }
    .chat-title { font-size: 18px; }
    .chat-title span { font-size: 26px; }
    .chat-body { padding: 20px; gap: 14px; }
    .msg { max-width: 85%; }
    .msg-bubble { font-size: 14px; padding: 12px 16px; }
    .chat-input { padding: 14px; }
    .chat-input input { padding: 12px 16px; font-size: 14px; }
    .chat-input button { padding: 12px 20px; font-size: 18px; }

    .chat-float { bottom: 28px; left: 28px; width: 64px; height: 64px; font-size: 28px; }
    .chat-badge { top: -6px; right: -20px; font-size: 11px; padding: 3px 8px; }

    .dash-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; padding: 0 24px; }
    .dash-card { padding: 28px; }
    .dash-icon { font-size: 38px; }
    .dash-card h3 { font-size: 17px; }
    .dash-card p { font-size: 13px; }

    .orders-list { padding: 0 24px; }
    .order-row { padding: 16px 20px; font-size: 14px; }

    .ticket-wrap { padding: 0 24px; }
    .ticket-form input, .ticket-form textarea { font-size: 14px; padding: 14px 18px; }

    .footer { padding: 40px 24px 20px; margin-top: 80px; }
    .footer-inner { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: right; }
    .footer-col h4 { font-size: 16px; }
    .footer-col a, .footer-col p { font-size: 13px; }
    .footer-bottom { font-size: 12px; }
}
