/* =========================================
   MODERN PROFESSIONAL THEME
   ========================================= */
:root {
    /* Color Palette - Inspired by modern SaaS */
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131a;
    --bg-card: rgba(20, 20, 28, 0.6);

    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;

    --accent-500: #8b5cf6;
    --accent-600: #7c3aed;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-subtle: rgba(148, 163, 184, 0.1);
    --border-medium: rgba(148, 163, 184, 0.2);

    /* Effects */
    --glow-primary: 0 0 20px rgba(99, 102, 241, 0.15);
    --glow-accent: 0 0 20px rgba(139, 92, 246, 0.15);

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* =========================================
   BASE & RESET
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   BACKGROUND EFFECTS
   ========================================= */
.ambient-light {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
}

/* =========================================
   LAYOUT
   ========================================= */
.logo-container {
    position: fixed;
    top: 32px;
    left: 32px;
    z-index: 100;
}

#app-logo {
    width: 48px;
    height: auto;
}

#app-logo:hover {
    opacity: 1;
}

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-content {
    max-width: 700px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Brand Logo Large (Danil.) */
.brand-logo-large {
    margin-bottom: 48px;
}

.brand-text {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(64px, 12vw, 120px);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}


.hero-logo {
    width: 180px;
    height: auto;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Hero Headline */
.hero-headline {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(28px, 6vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.hero-headline .highlight {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--accent-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Description */
.hero-description {
    font-size: clamp(16px, 2.5vw, 18px);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 48px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

/* Legacy brand styles (for other views) */
.mega-brand {
    margin-bottom: 24px;
}

.brand-top {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(32px, 8vw, 56px);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.brand-bottom {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(18px, 4vw, 28px);
    font-weight: 600;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--accent-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
}

.subtitle {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 48px;
    padding-bottom: 16px;
    position: relative;
}

.subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-500), transparent);
}

/* =========================================
   CARDS
   ========================================= */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 48px;
    max-width: 480px;
    width: 100%;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.3),
        0 10px 10px -5px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.8s ease-out;
}

.card h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card .subtitle {
    margin-bottom: 32px;
}

/* =========================================
   BUTTONS
   ========================================= */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 400px;
    margin: 0 auto;
}

.facebook-btn,
.whatsapp-btn,
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 32px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.facebook-btn::before,
.whatsapp-btn::before,
.primary-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.facebook-btn:hover::before,
.whatsapp-btn:hover::before,
.primary-btn:hover::before {
    opacity: 1;
}

.facebook-btn,
.primary-btn {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
}

.facebook-btn:hover,
.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 15px -3px rgba(99, 102, 241, 0.3),
        var(--glow-primary);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.2);
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 15px -3px rgba(34, 197, 94, 0.3),
        0 0 20px rgba(34, 197, 94, 0.15);
}

.secondary-btn {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.secondary-btn:hover {
    color: var(--primary-500);
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-top: 24px;
}

.text-btn:hover {
    color: var(--text-secondary);
}

/* =========================================
   FORMS
   ========================================= */
.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    padding: 12px 16px;
    background: rgba(15, 15, 25, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-500);
    background: rgba(15, 15, 25, 0.7);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* =========================================
   STATUS MESSAGES
   ========================================= */
.status-message {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-top: 16px;
    border: 1px solid;
}

.status-message.info {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.status-message.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.status-message.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.error-message {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: #fca5a5;
    font-size: 14px;
    margin-bottom: 16px;
}

/* =========================================
   LOADING & SUCCESS
   ========================================= */
.loading {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.success-container,
.error-container {
    text-align: center;
    padding: 20px 0;
}

.success-icon,
.error-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.success-icon {
    color: #22c55e;
}

.error-icon {
    color: #ef4444;
}

.retry-btn {
    margin-top: 24px;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
    background: rgba(99, 102, 241, 0.05);
}

/* =========================================
   UTILITIES
   ========================================= */
.hidden {
    display: none !important;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 640px) {
    .logo-container {
        top: 20px;
        left: 20px;
    }

    #app-logo {
        width: 48px;
        height: auto;
    }

    .container {
        padding: 20px 16px;
    }

    .card {
        padding: 32px 24px;
    }

    .hero-content {
        padding: 0 16px;
    }
}

/* =========================================
   MODAL
   ========================================= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-primary);
}

/* =========================================
   URL RESULT
   ========================================= */
.url-result-container {
    margin-top: 24px;
    padding: 20px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    animation: fadeIn 0.3s ease-out;
}

.url-result-container h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-500);
    margin-bottom: 12px;
}

.url-display {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.url-display input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: 'Inter', monospace;
    font-size: 14px;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    border-color: var(--primary-500);
    background: rgba(99, 102, 241, 0.1);
}

.expiration-info {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
}

.expiration-info span {
    color: var(--primary-500);
    font-weight: 600;
}

.phone-input-group {
    display: flex;
    gap: 12px;
}

.country-code-input {
    width: 80px;
    text-align: center;
}

.phone-number-input {
    flex: 1;
}

/* =========================================
   DASHBOARD ACTIONS
   ========================================= */
.dashboard-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.dashboard-actions button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 32px;
}

@media (max-width: 640px) {
    .dashboard-actions button {
        width: 100%;
    }
}