/* ============================================
   SMSVerifier - Minimal, Fast CSS
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --dark: #1f2937;
    --gray: #6b7280;
    --light: #f3f4f6;
    --white: #ffffff;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header
   ============================================ */

.header {
    background: var(--white);
    border-bottom: 1px solid var(--light);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 20px;
    color: var(--dark);
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover { color: var(--primary); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: var(--light);
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-trigger:hover {
    background: #e5e7eb;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-balance {
    font-weight: 600;
    font-size: 14px;
    color: var(--secondary);
}

.user-menu-trigger .chevron {
    color: var(--gray);
    transition: transform 0.2s;
}

.user-menu.open .chevron {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    display: none;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
}

.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    display: block;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.dropdown-email {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-balance {
    font-size: 13px;
    color: var(--gray);
}

.dropdown-balance strong {
    color: var(--secondary);
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--light);
}

.dropdown-item svg {
    color: var(--gray);
}

.dropdown-item-danger {
    color: var(--danger);
}

.dropdown-item-danger svg {
    color: var(--danger);
}

.btn-ghost {
    background: transparent;
    color: var(--gray);
    border: 1px solid #e5e7eb;
}

.btn-ghost:hover {
    background: var(--light);
    color: var(--dark);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--light) 0%, var(--white) 100%);
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--dark);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--gray);
    margin-bottom: 40px;
}

/* Search Box */
.hero-search {
    max-width: 600px;
    margin: 0 auto 32px;
    position: relative;
}

.search-box {
    display: flex;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 2px solid var(--light);
}

.search-box:focus-within {
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-box input {
    flex: 1;
    padding: 16px 16px 16px 48px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-box .btn {
    border-radius: 0;
    padding: 16px 32px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    margin-top: 8px;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.search-results.active { display: block; }

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--light);
}

.search-result-item:hover { background: var(--light); }

/* Popular Services */
.popular-services {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.popular-label {
    color: var(--gray);
    font-size: 14px;
}

.service-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--light);
    border-radius: 100px;
    font-size: 14px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s;
}

.service-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chip-price {
    color: var(--secondary);
    font-weight: 600;
}

/* ============================================
   Features
   ============================================ */

.features {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.feature {
    text-align: center;
    padding: 32px;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.feature p {
    color: var(--gray);
    font-size: 14px;
}

/* ============================================
   How it Works
   ============================================ */

.how-it-works {
    padding: 80px 0;
    background: var(--light);
}

.how-it-works h2,
.services-section h2,
.pricing-preview h2,
.faq-preview h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 48px;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 48px;
}

.step {
    text-align: center;
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius);
    flex: 1;
    max-width: 280px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    margin: 0 auto 16px;
}

.step-arrow {
    font-size: 24px;
    color: var(--gray);
}

.cta-center {
    text-align: center;
}

/* ============================================
   Services Grid
   ============================================ */

.services-section {
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

.service-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.2s;
}

.service-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

/* ============================================
   Pricing Preview
   ============================================ */

.pricing-preview {
    padding: 80px 0;
    background: var(--light);
}

.pricing-examples {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 48px;
}

.price-card {
    background: var(--white);
    padding: 32px 48px;
    border-radius: var(--radius);
    text-align: center;
    border: 2px solid var(--light);
}

.price-card.featured {
    border-color: var(--primary);
    transform: scale(1.05);
}

.price-service {
    font-weight: 600;
    margin-bottom: 8px;
}

.price-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.price-note {
    color: var(--gray);
    font-size: 14px;
}

/* ============================================
   FAQ
   ============================================ */

.faq-preview {
    padding: 80px 0;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto 48px;
}

.faq-item {
    border-bottom: 1px solid var(--light);
}

.faq-item summary {
    padding: 20px 0;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item p {
    padding: 0 0 20px;
    color: var(--gray);
}

/* ============================================
   Final CTA
   ============================================ */

.final-cta {
    padding: 80px 0;
    background: var(--primary);
    color: var(--white);
    text-align: center;
}

.final-cta h2 {
    margin-bottom: 8px;
}

.final-cta p {
    opacity: 0.9;
    margin-bottom: 24px;
}

.final-cta .btn {
    background: var(--white);
    color: var(--primary);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 64px 0 32px;
    background: var(--dark);
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--gray);
    margin-top: 16px;
}

.footer-links h4 {
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 8px;
}

.footer-links a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 24px;
    text-align: center;
    color: var(--gray);
}

/* ============================================
   App Styles (SPA)
   ============================================ */

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: var(--white);
    border-bottom: 1px solid var(--light);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-main {
    flex: 1;
    padding: 24px;
    background: var(--light);
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card-header {
    margin-bottom: 24px;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
}

/* Smart Suggestions */
.suggestions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.suggestion-card {
    padding: 20px;
    border: 2px solid var(--light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.suggestion-card:hover {
    border-color: var(--primary);
}

.suggestion-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.suggestion-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 8px;
}

.suggestion-country {
    font-size: 24px;
    margin-bottom: 4px;
}

.suggestion-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.suggestion-meta {
    font-size: 12px;
    color: var(--gray);
}

/* Country List */
.country-list {
    max-height: 400px;
    overflow-y: auto;
}

.country-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--light);
    cursor: pointer;
}

.country-item:hover { background: var(--light); }

.country-flag { font-size: 24px; margin-right: 12px; }
.country-name { flex: 1; font-weight: 500; }
.country-price { color: var(--primary); font-weight: 700; }
.country-stock { color: var(--gray); font-size: 12px; margin-left: 12px; }

/* Order Status */
.order-status {
    text-align: center;
    padding: 48px;
}

.phone-number {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Monaco', 'Consolas', monospace;
}

.status-waiting {
    color: var(--warning);
}

.status-received {
    color: var(--secondary);
}

.sms-code {
    font-size: 48px;
    font-weight: 800;
    color: var(--secondary);
    padding: 24px 48px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius);
    margin: 24px 0;
    font-family: 'Monaco', 'Consolas', monospace;
    display: inline-block;
}

.timer {
    font-size: 14px;
    color: var(--gray);
}

.progress-bar {
    height: 4px;
    background: var(--light);
    border-radius: 2px;
    margin: 24px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .nav { display: none; }
    .steps { flex-direction: column; }
    .step-arrow { transform: rotate(90deg); }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .pricing-examples { flex-direction: column; align-items: center; }
    .price-card.featured { transform: none; }
    .suggestions { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .search-box { flex-direction: column; }
    .search-box .btn { width: 100%; }
}
