:root {
    --bg-color: #030303;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-primary: #8e2de2;
    --accent-secondary: #4a00e0;
    --accent-glow: rgba(142, 45, 226, 0.5);
    --text-main: #f8f9fa;
    --text-muted: #9499ad;
    --font-family: 'Outfit', sans-serif;
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(142, 45, 226, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(74, 0, 224, 0.15) 0%, transparent 40%);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    perspective: 1500px;
}

/* Floating Background Blobs */
body::before, body::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: move 25s infinite alternate ease-in-out;
}

body::before {
    background: var(--accent-primary);
    top: -100px;
    left: -100px;
    opacity: 0.4;
}

body::after {
    background: var(--accent-secondary);
    bottom: -100px;
    right: -100px;
    opacity: 0.4;
    animation-delay: -10s;
}

@keyframes move {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(100px, 100px) scale(0.9); }
}

.main-container {
    width: 100%;
    max-width: 1100px;
    padding: 2rem;
    z-index: 1;
    transform-style: preserve-3d;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.glass-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.title-section {
    text-align: center;
    margin-bottom: 4rem;
    transform: translateZ(50px);
}

.title-section h1 {
    font-size: 5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 20%, var(--accent-primary) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -3px;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    text-transform: uppercase;
}

.workspace {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 850px) {
    .workspace {
        grid-template-columns: 1fr;
    }
}

.canvas-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    transform: translateZ(20px);
}

canvas#main-canvas {
    background: #0a0a0a;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    cursor: crosshair;
    touch-action: none;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0,0,0,0.5);
}

.result-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateZ(30px);
}

.prediction-box {
    text-align: center;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 0 20px rgba(255,255,255,0.02);
}

#prediction {
    font-size: 8rem;
    font-weight: 800;
    background: linear-gradient(to bottom, #fff, var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px var(--accent-glow));
    line-height: 1;
    margin: 1rem 0;
    min-height: 8rem;
}

#confidence {
    font-size: 1.4rem;
    color: var(--text-muted);
    font-weight: 300;
}

#confidence strong {
    color: #fff;
    font-weight: 600;
}

.btn-modern {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 4px 0px var(--accent-secondary);
    position: relative;
    top: 0;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(142, 45, 226, 0.4), 0 6px 0px var(--accent-secondary);
}

.btn-modern:active {
    transform: translateY(4px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3), 0 0px 0px var(--accent-secondary);
}

.info-section {
    margin-top: 1rem;
}

.group-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.group-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 16px;
    font-size: 0.9rem;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.group-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateZ(10px);
}

.group-item span {
    color: var(--accent-primary);
    font-weight: 600;
    display: block;
    font-size: 0.75rem;
    margin-top: 4px;
    opacity: 0.8;
}

.footer-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 3rem;
    opacity: 0.6;
    letter-spacing: 1px;
}