:root {
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --secondary: #10B981;
    --accent: #F59E0B;
    --dark: #0f172a;
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --glass-bg: rgba(15, 23, 42, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f172a;
    color: var(--text);
    overflow-x: hidden;
    position: relative;
}

/* Background Slider */
.bg-slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3;
    background: #0f172a;
    overflow: hidden;
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideAnimation 24s infinite;
}

.bg-slide:nth-child(1) { animation-delay: 0s; }
.bg-slide:nth-child(2) { animation-delay: 8s; }
.bg-slide:nth-child(3) { animation-delay: 16s; }

@keyframes slideAnimation {
    0% { opacity: 0; transform: scale(1.05); }
    10% { opacity: 1; transform: scale(1.1); }
    33% { opacity: 1; transform: scale(1.15); }
    43% { opacity: 0; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(1.05); }
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7));
    z-index: -2;
}

.bubbles {
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    top: 0;
    left: 0;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    animation: floatUp 15s infinite ease-in;
}

.bubble:nth-child(1) { left: 10%; width: 80px; height: 80px; animation-duration: 12s; }
.bubble:nth-child(2) { left: 25%; width: 40px; height: 40px; animation-duration: 18s; animation-delay: 2s; }
.bubble:nth-child(3) { left: 60%; width: 120px; height: 120px; animation-duration: 20s; animation-delay: 4s; }
.bubble:nth-child(4) { left: 80%; width: 60px; height: 60px; animation-duration: 14s; animation-delay: 1s; }
.bubble:nth-child(5) { left: 40%; width: 90px; height: 90px; animation-duration: 22s; animation-delay: 7s; }
.bubble:nth-child(6) { left: 90%; width: 50px; height: 50px; animation-duration: 16s; animation-delay: 10s; }

@keyframes floatUp {
    0% { transform: translateY(0) scale(1) rotate(0deg); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(-120vh) scale(1.2) rotate(360deg); opacity: 0; }
}

/* Layout */
.container {
    width: 90%;
    max-width: 1300px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
    z-index: 10;
    padding: 3rem 0;
}

/* Left Info Section */
.info-section {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    width: max-content;
}

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

.logo h2 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ffffff, #94A3B8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-text .subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.6;
    max-width: 90%;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 1rem;
    transition: all 0.4s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
}

.icon-box {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.icon-box::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.2;
}

.tax-icon { color: #3B82F6; }
.tax-icon::before { background: currentColor; }
.tax-icon { border: 1px solid rgba(59, 130, 246, 0.3); }

.agri-icon { color: #10B981; }
.agri-icon::before { background: currentColor; }
.agri-icon { border: 1px solid rgba(16, 185, 129, 0.3); }

.doc-icon { color: #8B5CF6; }
.doc-icon::before { background: currentColor; }
.doc-icon { border: 1px solid rgba(139, 92, 246, 0.3); }

.mail-icon { color: #F59E0B; }
.mail-icon::before { background: currentColor; }
.mail-icon { border: 1px solid rgba(245, 158, 11, 0.3); }

.feature-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #fff;
}

.feature-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Auth Section Focus */
.auth-section {
    flex: 1;
    position: relative;
    max-width: 480px;
    perspective: 1000px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px var(--glass-shadow);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center center;
    position: relative;
}

.glass-panel.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: rotateY(-15deg) scale(0.9);
}

.hidden:not(.glass-panel) {
    display: none !important;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.panel-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.panel-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.panel-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #cbd5e1;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1.2rem;
    color: #64748b;
    transition: color 0.3s;
}

.input-wrapper input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

.input-wrapper input:focus + i, 
.input-wrapper input:focus ~ i {
    color: var(--primary);
}

.input-wrapper input.readonly-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: #94A3B8;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
    cursor: not-allowed;
}

.panel-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #94A3B8;
}

.panel-footer a {
    color: #60A5FA;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: color 0.3s, text-decoration 0.3s;
}

.panel-footer a:hover {
    color: #93C5FD;
    text-decoration: underline;
}

/* OCR Section */
.ocr-section {
    margin-bottom: 1.5rem;
}

.ocr-upload {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 2.5rem 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.ocr-upload:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.02);
}

.upload-icon-anim {
    font-size: 2.5rem;
    color: #94A3B8;
    margin-bottom: 1rem;
    display: inline-block;
}

.ocr-upload h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.file-input {
    display: none;
}

.btn-secondary {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 2rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Loading & Success States */
.ocr-loading, .ocr-success {
    padding: 2.5rem 1rem;
    text-align: center;
    background: rgba(0,0,0,0.2);
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.scan-animation {
    position: relative;
    font-size: 3rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.scan-line {
    position: absolute;
    top: 0;
    left: -10%;
    width: 120%;
    height: 3px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: scan 2s infinite ease-in-out;
}

@keyframes scan {
    0% { top: -5%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 105%; opacity: 0; }
}

.pulsate {
    animation: pulseText 1.5s infinite;
    color: var(--primary);
    font-weight: 500;
}

@keyframes pulseText {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.success-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--secondary);
    margin: 0 auto 1rem;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.ocr-success p {
    color: var(--secondary);
    font-weight: 600;
}

.extracted-data-container {
    animation: fadeIn 0.8s ease-out;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        padding: 4rem 0;
        gap: 3rem;
    }
    .info-section {
        text-align: center;
        align-items: center;
    }
    .hero-text h1 {
        font-size: 3rem;
    }
    .glass-panel {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 576px) {
    .hero-text h1 {
        font-size: 2.2rem;
    }
    .glass-panel {
        padding: 2rem 1.5rem;
    }
    .input-row {
        grid-template-columns: 1fr;
    }
}
