@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;700&family=Space+Mono&display=swap');

/* =========================================
   Base & Reset
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand & Accents - QR is Electric Blue */
    --brand: #3B82F6; 
    --brand-hover: #2563EB;
    --brand-glow: rgba(59, 130, 246, 0.25);
    --error-color: #EF4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    
    /* Dark Theme Surface */
    --bg-base: #09090b; /* Zinc 950 */
    --bg-surface: rgba(24, 24, 27, 0.6); /* Zinc 900 transparent */
    --bg-input: rgba(9, 9, 11, 0.8);
    
    /* Typography */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa; /* Zinc 400 */
    --text-muted: #71717a; /* Zinc 500 */
    
    /* Borders & UI */
    --border-light: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --ring: rgba(59, 130, 246, 0.4);
    
    /* Structural */
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 8px;
    
    /* Fonts */
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem 6rem;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Background Mesh & Grid */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.05), transparent 25%);
    z-index: -2;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: linear-gradient(var(--border-light) 1px, transparent 1px),
                      linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 10%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 10%, transparent 80%);
    z-index: -1;
    pointer-events: none;
    opacity: 0.3;
}

a { text-decoration: none; color: inherit; transition: all 0.2s; }

.app-wrapper {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

/* =========================================
   Header
========================================= */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

.back-link {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.back-link:hover { color: var(--text-primary); }

.logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}
.text-accent { color: var(--brand); }

/* =========================================
   Glassmorphism Card
========================================= */
.card, .seo-content {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.card-header {
    padding: 3rem 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
}

.title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.card-body {
    padding: 2.5rem 2rem 3rem;
}

/* =========================================
   Form Inputs
========================================= */
.input-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.input-group label {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon .icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
}

input[type="text"] {
    width: 100%;
    padding: 1rem 1.25rem 1rem 45px;
    font-size: 1rem;
    font-family: var(--font-sans);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background-color: var(--bg-input);
    color: var(--text-primary);
    transition: all 0.2s ease;
}
input[type="text"]::placeholder { color: var(--text-muted); }
input[type="text"]:hover { border-color: var(--border-hover); }
input[type="text"]:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--ring);
    background-color: rgba(9, 9, 11, 0.95);
}

/* Error Message */
.error-message {
    display: none;
    align-items: flex-start;
    gap: 10px;
    background-color: var(--error-bg);
    color: var(--error-color);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 5px;
    animation: slideDown 0.3s ease-out;
}
.error-message.active { display: flex; }

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

/* =========================================
   Buttons
========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1.1rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
}
.btn:active { transform: scale(0.98); }
.btn-full { width: 100%; }

.btn-primary { 
    background-color: var(--brand); 
    color: #fff; 
    box-shadow: 0 4px 14px var(--brand-glow);
}
.btn-primary:hover { 
    background-color: var(--brand-hover); 
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); 
}

.btn-outline { 
    background-color: transparent; 
    border: 1px solid var(--border-light); 
    color: var(--text-primary); 
}
.btn-outline:hover { 
    border-color: var(--border-hover); 
    background-color: rgba(255, 255, 255, 0.05); 
}

/* =========================================
   Result Section
========================================= */
.result-section {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 35px;
    padding-top: 35px;
    border-top: 1px solid var(--border-light);
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.result-section.active { display: flex; }

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

.qr-container {
    background: #FFF;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 30px var(--brand-glow);
    border: 2px solid transparent;
}
#qrcode img, #qrcode canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Security Badge */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: -10px;
}
.security-badge i { color: #10B981; }

/* =========================================
   SEO Content Block
========================================= */
.seo-content {
    max-width: 800px;
    width: 100%;
    margin-top: 40px;
    padding: 3.5rem 3rem;
    margin-bottom: 40px;
}

.seo-inner {
    margin: 0 auto;
}

.seo-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.seo-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.seo-section { margin-bottom: 50px; }
.seo-section h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.seo-section h3::before {
    content: '';
    display: block;
    width: 20px;
    height: 3px;
    background: var(--brand);
    border-radius: 2px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.benefit-card {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.benefit-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.02);
}
.benefit-card i {
    font-size: 2rem;
    color: var(--brand);
    margin-bottom: 15px;
    display: block;
}
.benefit-card h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.benefit-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* FAQs */
.faq-item { margin-bottom: 25px; }
.faq-item h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--brand);
}
.faq-item p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}
.faq-item code {
    font-family: var(--font-mono);
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--text-primary);
}

.app-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-bottom: 40px;
}

@media (max-width: 768px) {
    .seo-content { padding: 30px 20px; border-radius: var(--radius-xl); }
    .seo-header h2 { font-size: 1.75rem; }
    .benefits-grid { grid-template-columns: 1fr; }
}
