/* index.css - Modern Glassmorphic Dark Mode Theme */

:root {
    --bg-main: #0B0F19;
    --card-bg: rgba(22, 28, 45, 0.45);
    --card-border: rgba(255, 255, 255, 0.06);
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --primary: #3B82F6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent: #10B981;
    --accent-glow: rgba(16, 185, 129, 0.4);
    --error: #EF4444;
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Glowing Background Blobs */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.25;
    mix-blend-mode: screen;
    animation: float 20s infinite alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, rgba(0,0,0,0) 70%);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #8B5CF6 0%, rgba(0,0,0,0) 70%);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent) 0%, rgba(0,0,0,0) 70%);
    top: 40%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -60px) scale(1.1); }
    100% { transform: translate(-20px, 30px) scale(0.9); }
}

/* App Container */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

.logo {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #FFF 40%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-accent {
    color: var(--primary);
    -webkit-text-fill-color: initial;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
    font-weight: 300;
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 2rem;
    flex-grow: 1;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
}

/* Cards (Glassmorphism) */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card h2 {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Form Controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label, .label-heading {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

textarea {
    width: 100%;
    height: 180px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    resize: none;
    outline: none;
    transition: var(--transition);
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Presets */
.presets-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preset-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-preset {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-preset:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    transform: translateX(4px);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1D4ED8 100%);
    border: none;
    color: white;
    padding: 1rem;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px var(--primary-glow);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-primary);
}

/* Results Card Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--card-border);
    gap: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.5rem 0 0.75rem 0;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

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

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary);
}

.tab-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.hidden {
    display: none !important;
}

/* Previews & Placeholders */
.placeholder-preview {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1rem;
    border: 2px dashed rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
}

.placeholder-icon {
    font-size: 3rem;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

.placeholder-preview h3 {
    font-size: 1.25rem;
}

.placeholder-preview p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 320px;
}

.viewer-container {
    flex-grow: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: #FFF; /* Whitewater vector preview contrasts well */
    height: 450px;
}

.download-bar {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.download-bar a {
    flex: 1;
}

/* Console Logs */
.console-log {
    flex-grow: 1;
    background: #05070C;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-y: auto;
    max-height: 500px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.log-line {
    color: #A7F3D0;
}

.log-line.system {
    color: var(--text-secondary);
}

.log-line.error {
    color: var(--error);
}

.log-line.progress {
    color: #60A5FA;
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
}

.status-indicator.online {
    color: var(--accent);
}

.status-indicator.online::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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