:root {
    --bg-deep: #020617;
    --accent-teal: #2dd4bf;
    --accent-violet: #a855f7;
    --glass-card: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-x: hidden;
    position: relative;
}

/* --- Animated Mesh Background --- */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-teal) 0%, transparent 70%);
    filter: blur(80px);
    opacity: 0.15;
    animation: float 20s infinite alternate;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, var(--accent-violet) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

/* --- Main Container --- */
.container {
    width: 100%;
    max-width: 900px;
    z-index: 10;
}

.glass-card {
    background: var(--glass-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3.5rem;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-teal), var(--accent-violet), transparent);
}

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

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 30%, var(--accent-teal) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    font-weight: 300;
}

/* --- Input Area --- */
.input-section {
    margin-bottom: 2.5rem;
    position: relative;
}

textarea {
    width: 100%;
    height: 180px;
    background: rgba(2, 6, 23, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.6;
    resize: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

textarea:focus {
    border-color: var(--accent-teal);
    background: rgba(2, 6, 23, 0.6);
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.1);
}

.btn-container {
    display: flex;
    justify-content: center;
}

button {
    background: #fff;
    color: #020617;
    border: none;
    border-radius: 14px;
    padding: 1.1rem 3rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
    background: var(--accent-teal);
}

button:active { transform: translateY(0); }

/* --- Bento Grid Results --- */
.results-section {
    margin-top: 4rem;
    animation: fadeInUp 0.8s ease-out;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.bento-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.bento-card.top-prediction {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(168, 85, 247, 0.1));
    border-color: rgba(45, 212, 191, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.card-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 0.5rem;
}

.card-value span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.prediction-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* --- Progress Bar (Slim) --- */
.mini-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    width: 100%;
    margin-top: 1rem;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: var(--accent-teal);
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Footer --- */
footer {
    margin-top: 4rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.7;
}

footer a { color: var(--accent-teal); text-decoration: none; }

/* Responsive adjustments */
@media (max-width: 640px) {
    .glass-card { padding: 2rem; }
    h1 { font-size: 2.2rem; }
    .bento-card.top-prediction { grid-column: span 1; }
}
