/**
 * AltynAlert Custom Design System CSS
 * Premium dark mode, glassmorphism, responsive grids, and clean transitions.
 * Part of SGC Group (aa.sgc.kz)
 */

/* Variables */
:root {
    --bg-dark: #070a13;
    --bg-card: rgba(22, 28, 45, 0.4);
    --border-color: rgba(255, 255, 255, 0.08);
    --gold: #ffd700;
    --gold-hover: #ffea70;
    --purple: #a855f7;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Montserrat', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
*::-webkit-scrollbar {
    display: none;
}

body {
    background-color: var(--bg-dark);
    font-family: var(--font-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Glassmorphism Class */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-radius: 16px;
}
.glass-h {
    transition: var(--transition);
}
.glass-h:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(255, 215, 0, 0.1);
}

/* Typography Helpers */
.gold-text {
    background: linear-gradient(135deg, var(--gold) 0%, #ffa500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}
.purple-text {
    background: linear-gradient(135deg, var(--purple) 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}
em {
    font-style: normal;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-main);
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, #ffa500 100%);
    color: #070a13;
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.3);
}
.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-hover) 0%, #ffbe33 100%);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}
.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid transparent;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}
.btn-large {
    padding: 16px 36px;
    font-size: 16px;
}
.btn-block {
    display: flex;
    width: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    z-index: 100;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}
.logo .version {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 8px;
    color: var(--text-secondary);
}
.nav-menu {
    display: flex;
    gap: 32px;
}
.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}
.nav-menu a:hover {
    color: var(--text-primary);
}
.nav-auth {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nav-auth .username {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Hero Section */
.hero {
    padding-top: 160px;
    padding-bottom: 60px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(255, 215, 0, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.15);
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.hero h1 {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 24px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 40px;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Stats Section */
.stats-section {
    padding: 20px 0 60px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.stat-card {
    padding: 24px;
    text-align: center;
}
.stat-card h3 {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.stat-num {
    font-size: 36px;
    font-weight: 900;
}

/* Features Section */
.features-section {
    padding: 60px 0;
}
.section-header {
    text-align: center;
    margin-bottom: 48px;
}
.section-tag {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 12px;
}
.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
}
.section-header p {
    color: var(--text-secondary);
    font-size: 16px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    padding: 32px 24px;
    text-align: left;
}
.feature-icon {
    font-size: 32px;
    margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}
.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* Pricing Section */
.pricing-section {
    padding: 60px 0;
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}
.price-card {
    padding: 40px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}
.price-card.active {
    border-color: var(--gold);
    box-shadow: 0 8px 32px 0 rgba(255, 215, 0, 0.12);
}
.price-card.expert {
    border-color: var(--purple);
    box-shadow: 0 8px 32px 0 rgba(168, 85, 247, 0.12);
}
.recommend {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: #070a13;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 8px;
}
.plan-name {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 16px;
    text-transform: uppercase;
}
.price {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 24px;
}
.price span {
    font-size: 16px;
    color: var(--text-secondary);
}
.plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 32px;
}
.plan-features li {
    padding: 10px 0;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.plan-features li::before {
    content: "✓";
    color: var(--gold);
    font-weight: 800;
    margin-right: 10px;
}
.price-card.expert .plan-features li::before {
    color: var(--purple);
}

/* How It Works Section */
.how-section {
    padding: 60px 0 100px;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.step-card {
    padding: 32px 24px;
    text-align: center;
    position: relative;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
}
.step-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}
.step-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* Footer */
.footer {
    padding-bottom: 48px;
}
.footer-divider {
    height: 1px;
    background: var(--border-color);
    margin-bottom: 40px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}
.footer-brand p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.sgc-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    margin-right: 24px;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--text-primary);
}
.footer-copy {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
}
.modal {
    width: 90%;
    max-width: 400px;
    padding: 32px;
    position: relative;
}
.close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}
.close-btn:hover {
    color: var(--text-primary);
}
.modal h2 {
    font-size: 22px;
    margin-bottom: 24px;
    text-align: center;
}
.form-group {
    margin-bottom: 16px;
    text-align: left;
}
.form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.08);
}
.form-error {
    color: var(--danger);
    font-size: 12px;
    margin-bottom: 16px;
    text-align: center;
}
.modal-footer {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 16px;
    text-align: center;
}
.modal-footer a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

/* Animations helper */
.anim {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade {
    animation: fadeIn 0.3s ease-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 900px) {
    .features-grid, .pricing-grid, .steps-grid, .stats-grid {
        grid-template-columns: 1fr;
    }
    .nav-menu {
        display: none;
    }
    .hero h1 {
        font-size: 36px;
    }
    .hero p {
        font-size: 15px;
    }
}

/* Custom dropdown select styling to prevent white-on-white text issues */
select {
    background-color: #0b0f19 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}
select:focus {
    border-color: var(--gold) !important;
}
select option {
    background-color: #0b0f19 !important;
    color: #ffffff !important;
}
