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

:root {
    --primary: #7c3aed;
    --primary-dark: #5b21b6;
    --primary-light: #a855f7;
    --accent: #06b6d4;
    --text: #0f172a;
    --text-light: #475569;
    --text-muted: #64748b;
    --bg: #ffffff;
    --bg-gray: #f8fafc;
    --bg-dark: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #06b6d4 100%);
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(15 23 42 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

/* Global Styles */
h1, h2, h3, h4 { 
    font-weight: 700; 
    color: var(--text); 
}

h1 { font-size: 3.5rem; line-height: 1.1; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.25rem; }

p { color: var(--text-light); }

section { padding: 6rem 0; }

/* Cards */
.card {
    background: var(--bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

/* Grid Systems */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.flex { display: flex; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.gap { gap: 1rem; }

/* Text Utilities */
.text-center { text-align: center; }
.text-gradient {
    background: var(--gradient);
    -webkit-text-fill-color: transparent;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo h1 {
    color: var(--primary);
    font-size: 1.5rem;
}

.beta-badge {
    background: var(--gradient);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--bg-gray);
}

/* Hero */
.hero {
    padding: 6rem 0 8rem;
    background: radial-gradient(ellipse at top, rgba(124, 58, 237, 0.05) 0%, transparent 50%);
    position: relative;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.hero-title {
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient);
    margin: 1rem 0;
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Analysis Preview */
.analysis-preview {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.preview-status {
    background: var(--success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.analysis-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-gray);
    border-radius: 6px;
    transition: var(--transition);
}

.analysis-item:hover {
    background: rgba(124, 58, 237, 0.05);
}

.analysis-icon {
    font-size: 1.25rem;
    width: 32px;
    text-align: center;
}

.analysis-name {
    flex: 1;
    font-weight: 500;
}

.analysis-result {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.analysis-item:nth-child(1) .analysis-result { background: var(--success); color: white; }
.analysis-item:nth-child(2) .analysis-result { background: var(--primary); color: white; }
.analysis-item:nth-child(3) .analysis-result { background: var(--warning); color: white; }
.analysis-item:nth-child(4) .analysis-result { background: var(--border); color: var(--text-light); }

/* Insights Section */
.insights {
    background: var(--bg-dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.insights::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(124, 58, 237, 0.1) 0%, transparent 60%);
}

.insights .container {
    position: relative;
    z-index: 1;
}

.insights h3 {
    background: linear-gradient(135deg, white 0%, rgba(124, 58, 237, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.insights p {
    font-size: 1.125rem;
    opacity: 0.9;
}

.insight-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.insight-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(124, 58, 237, 0.3);
}

.insight-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.3));
}

.insight-card h4 {
    color: white;
    margin-bottom: 1rem;
}

.mystery-text {
    max-width: 600px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.mystery-text p {
    font-style: italic;
    opacity: 0.8;
}

/* Icons */
.icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.icon-sm { font-size: 2rem; }
.icon-lg { font-size: 2.5rem; }

/* CTA Section */
.cta {
    background: var(--gradient);
    color: white;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
}

/* Form */
.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

#email {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

#email::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#email:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.submit-btn {
    padding: 1rem 2rem;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 180px;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.1), transparent);
    transition: var(--transition);
}

.submit-btn:hover::before {
    left: 100%;
}

.btn-loading { display: none; }
.submit-btn.loading .btn-text { display: none; }
.submit-btn.loading .btn-loading { display: inline; }

.form-footer small {
    opacity: 0.8;
    line-height: 1.5;
}

/* Messages */
.success-message,
.error-message {
    display: none;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    text-align: center;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.success-icon,
.error-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.success-message.show,
.error-message.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.footer {
    background: var(--text);
    color: white;
    padding: 3rem 0 2rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

.footer-left { text-align: left; }
.footer-right { text-align: right; }

.footer-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.footer-link:hover {
    color: white;
    text-decoration: underline;
}

.footer-status,
.footer-credits,
.footer-motto {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-copyright {
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

/* Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-title {
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.1); }
}

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    
    h1 { font-size: 2.25rem; }
    h2, h3 { font-size: 2rem; }
    
    section { padding: 3rem 0; }
    
    .hero .container,
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .form-group { flex-direction: column; }
    .submit-btn { width: 100%; }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-left,
    .footer-center,
    .footer-right {
        text-align: center;
    }
    
    .analysis-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero { padding: 2rem 0 3rem; }
    h1 { font-size: 1.875rem; }
    .analysis-preview { padding: 1rem; }
}