/* Premium Glassmorphism & Modern UI - Web2App Converter */

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --card-bg: rgba(17, 24, 39, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    --input-bg: rgba(31, 41, 55, 0.6);
    --phone-bg: #000000;
}

[data-theme="light"] {
    --bg-primary: #f3f4f6;
    --bg-secondary: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(229, 231, 235, 0.8);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --accent-color: #4f46e5;
    --accent-hover: #4338ca;
    --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
    --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    --input-bg: rgba(243, 244, 246, 0.9);
    --phone-bg: #f9fafb;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Background Animated Blobs */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(90px);
    opacity: 0.35;
    border-radius: 50%;
    animation: blobFloat 18s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #6366f1;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 550px;
    height: 550px;
    background: #ec4899;
    animation-delay: -9s;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 80px) scale(1.1); }
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

/* Navbar */
.navbar-custom {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
}

.brand-text {
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Form Controls */
.form-control-custom {
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.25s ease;
}

.form-control-custom:focus {
    background: var(--input-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    color: var(--text-primary);
}

.form-label-custom {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* Switches & Toggles */
.form-check-input-custom {
    width: 2.75em !important;
    height: 1.5em !important;
    cursor: pointer;
    background-color: var(--input-bg);
    border-color: var(--card-border);
}

.form-check-input-custom:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Feature Grid Switch Boxes */
.feature-box {
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.feature-box:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

/* Primary Button */
.btn-accent {
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    font-weight: 700;
    border-radius: 14px;
    padding: 14px 28px;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.6);
    color: #ffffff;
}

/* Smartphone Mockup Frame */
.phone-mockup {
    width: 310px;
    height: 620px;
    background: #111;
    border-radius: 44px;
    border: 10px solid #22252a;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 24px;
    background: #22252a;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--phone-bg);
    display: flex;
    flex-direction: column;
    position: relative;
}

.phone-header {
    height: 64px;
    padding-top: 24px;
    background: var(--accent-color);
    color: #fff;
    display: flex;
    align-items: center;
    padding-left: 16px;
    padding-right: 16px;
    font-weight: 700;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.phone-header img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    margin-right: 10px;
    object-fit: cover;
}

.phone-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.phone-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.phone-splash-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: opacity 0.5s ease;
}

.phone-splash-preview img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

/* Progress Step Indicator */
.build-step {
    padding: 14px;
    border-radius: 12px;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.build-step.active {
    border-color: var(--accent-color);
    background: rgba(99, 102, 241, 0.15);
}

.build-step.completed {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 14px;
    background: var(--card-border);
    color: var(--text-secondary);
}

.build-step.active .step-icon {
    background: var(--accent-color);
    color: #fff;
    animation: pulse 1.5s infinite;
}

.build-step.completed .step-icon {
    background: #10b981;
    color: #fff;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* Log Window */
.log-box {
    background: #050811;
    border: 1px solid #1f293d;
    color: #38bdf8;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.8rem;
    border-radius: 12px;
    padding: 16px;
    max-height: 240px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Stats Badges */
.badge-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
}
