:root {
    --bg-dark: #070a0f;
    --neon-green: #00ff88;
    --neon-blue: #00d4ff;
    --deep-green: #0a2e1d;
    --glass-bg: rgba(10, 25, 30, 0.15);
    --glass-border: rgba(0, 255, 136, 0.2);
    --text-main: #e0f2f1;
    --text-muted: #8ebfa1;
}

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

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

/* Video Background */
.video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -10;
    transition: opacity 1.5s ease-in-out, filter 1.5s ease-in-out;
}
.active-video {
    opacity: 1;
    filter: blur(0px);
}
.inactive-video {
    opacity: 0;
    filter: blur(15px);
}

/* Overlay to ensure text readability and maintain the dark enchanted vibe */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 10, 15, 0.6); /* blends with --bg-dark */
    z-index: -5;
    pointer-events: none;
}

/* Background Magic Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 10s infinite alternate ease-in-out;
}
.orb-1 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.15) 0%, rgba(0,0,0,0) 70%);
    top: -50px; left: -100px;
}
.orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, rgba(0,0,0,0) 70%);
    bottom: -100px; right: -150px;
    animation-delay: -3s;
}
.orb-3 {
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(140, 0, 255, 0.1) 0%, rgba(0,0,0,0) 70%);
    top: 40%; left: 60%;
    animation-delay: -7s;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-40px) scale(1.1); }
}

/* Container */
#app-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    z-index: 10;
}

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-15 { margin-top: 15px; }

/* Header */
.glass-header {
    text-align: center;
    margin-bottom: 30px;
}
.alice-title {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 600;
    font-style: italic;
    background: linear-gradient(to right, #ffffff, var(--neon-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    margin-bottom: 5px;
}
.subtitle {
    color: var(--neon-blue);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 255, 136, 0.05);
    animation: fadeIn 0.6s ease-out;
}

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

/* Privacy Shield */
.privacy-shield {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 212, 255, 0.05);
    border-left: 3px solid var(--neon-blue);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 25px;
}
.shield-icon {
    font-size: 24px;
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
.shield-text strong {
    display: block;
    font-size: 14px;
    color: #fff;
    margin-bottom: 2px;
}
.shield-text p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Buttons */
.btn-magic {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.8), rgba(0, 150, 136, 0.8));
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.btn-magic:hover {
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
    transform: translateY(-2px);
}
.btn-magic:disabled {
    background: #333;
    color: #888;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.pulse-animation {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(0, 255, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

.btn-outline {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--text-muted);
    border-radius: 12px;
    background: transparent;
    color: var(--text-main);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #fff;
}

/* Upload Area */
.portal-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-style: italic;
    margin-bottom: 8px;
    color: #fff;
}
.portal-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
.btn-category {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    padding: 20px 10px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    outline: none;
}
.btn-category:hover {
    background: rgba(0, 255, 136, 0.05);
    border-color: rgba(0, 255, 136, 0.5);
}
.btn-category.selected {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.15);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}
.action-buttons button {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* Preview Area */
.image-wrapper {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
#ai-image-preview {
    width: 100%;
    display: block;
    filter: contrast(1.1) brightness(0.9);
}

/* Scanning Effect */
#ai-scanning-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 255, 136, 0.05);
    z-index: 5;
}
.scanning-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--neon-green);
    box-shadow: 0 0 15px var(--neon-green), 0 0 30px var(--neon-green);
    animation: scan 2.5s ease-in-out infinite;
}
.scanning-text {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: var(--neon-green);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--neon-green);
    animation: fadePulse 1.5s infinite;
}

@keyframes scan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}
@keyframes fadePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Results Panel */
.results-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--neon-green);
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0,255,136,0.2);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.results-content {
    font-size: 14px;
    line-height: 1.6;
    color: #e0f2f1;
}
.results-content h1, .results-content h2, .results-content h3 {
    color: #fff;
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 16px;
}
.results-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}
.results-content li {
    margin-bottom: 5px;
    color: #c0ebd4;
}
.results-content strong {
    color: var(--neon-blue);
}
