:root {
    --bg-dark: #0a0b10;
    --card-bg: #121420;
    --neon-cyan: #00f2fe;
    --neon-blue: #4facfe;
    --neon-magenta: #f355da;
    --neon-green: #39ff14;
    --neon-red: #ff3131;
    --text-main: #e2e8f0;
    --text-muted: #64748b;
    --border-color: #2a2e45;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 850px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 
                0 0 30px rgba(79, 172, 254, 0.05);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.pro-tag {
    font-size: 0.9rem;
    vertical-align: super;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 900;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 6px;
}

/* Dashboard & Scoring */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.03);
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.02);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.neon-text-blue { text-shadow: 0 0 8px var(--neon-cyan); color: var(--neon-cyan); }
.neon-text-purple { text-shadow: 0 0 8px var(--neon-magenta); color: var(--neon-magenta); }

.progress-container {
    grid-column: span 2;
    margin-top: 5px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

#status-message {
    color: var(--neon-cyan);
    font-weight: 500;
    transition: color 0.3s ease;
}

.progress-bar-wrapper {
    width: 100%;
    height: 10px;
    background: #1e2235;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-magenta));
    box-shadow: 0 0 10px var(--neon-blue);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* User Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

input[type="text"], select {
    width: 100%;
    padding: 12px 16px;
    background: #181b2a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 8px rgba(79, 172, 254, 0.25);
}

/* Action Control Zone */
.action-zone {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 30px 0;
}

.btn {
    padding: 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-title {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.btn-desc {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.8;
}

.btn-big {
    background: linear-gradient(135deg, #2c1616, #4a1515);
    color: #ffbcbc;
    border: 1px solid var(--neon-red);
}

.btn-big:hover {
    box-shadow: 0 0 15px rgba(255, 49, 49, 0.4);
    transform: translateY(-2px);
}

.btn-small {
    background: linear-gradient(135deg, #112a14, #144419);
    color: #bfffbc;
    border: 1px solid var(--neon-green);
}

.btn-small:hover {
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(1px);
}

/* Outputs & Architecture Display Panel */
.output-panel {
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
    position: relative;
    min-height: 180px;
}

.output-panel h2 {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.bubble-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.placeholder-bubble {
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    padding-top: 30px;
}

/* Colored Bubbles Output Styling */
.bubble {
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    animation: slideIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bubble-meta {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.bubble-body {
    word-break: break-all;
    line-height: 1.4;
}

.bubble.big-app {
    background: rgba(255, 49, 49, 0.1);
    border: 1px solid var(--neon-red);
    color: #ffcccc;
    box-shadow: inset 0 0 10px rgba(255, 49, 49, 0.05);
}

.bubble.small-app {
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid var(--neon-green);
    color: #ccffcc;
    box-shadow: inset 0 0 10px rgba(57, 255, 20, 0.05);
}

/* Live Simulation Overlay */
.loading-overlay {
    position: absolute;
    top: 55px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 20, 32, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    gap: 15px;
}

.hidden {
    display: none !important;
}

.spinner {
    width: 35px;
    height: 35px;
    border: 3px solid rgba(255, 49, 49, 0.1);
    border-top: 3px solid var(--neon-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Customization */
@media (max-width: 600px) {
    .action-zone {
        grid-template-columns: 1fr;
    }
    .dashboard {
        grid-template-columns: 1fr;
    }
    .progress-container {
        grid-column: span 1;
    }
}