:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --success: #10b981;
    --error: #ef4444;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(76, 75, 162, 0.15) 0px, transparent 50%);
    color: #f8fafc;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Container Logic */
#sstart, #card, #endandcalc {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: all 0.3s ease;
}

/* Typography & Inputs */
h1 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; margin-bottom: 0.5rem; }
h2 { margin-top: 0; font-size: 1.5rem; }

input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 1rem;
    width: calc(100% - 32px);
    margin-bottom: 1.5rem;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Problem Display (The Big Number) */
#problem {
    background: transparent;
    border: none;
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    text-align: center;
    margin: 1rem 0;
    pointer-events: none; /* User shouldn't click this */
}

/* Operator Button Group */
#sstart h1:last-of-type + h1 {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

#sstart button[id] {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: white;
    height: 50px;
    font-size: 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

#sstart button[id]:hover {
    background: #94a3b8;
}



/* JS-Driven Class for Active Operator */
.selected-op {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    transform: scale(1.05);
}

/* Main Action Buttons */
#start, #submit, #restart {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
}

#start:hover, #submit:hover, #restart:hover {
    background: var(--primary-hover);
}

/* Feedback Styling */
#ufeedback { color: var(--error); font-size: 0.85rem; margin-bottom: 1rem; }
#feedback { font-weight: bold; min-height: 24px; margin: 1rem 0; }

/* Result Page Text */
#score { font-size: 2.5rem; color: var(--primary); margin: 0.5rem 0; }
#endinfo { color: #cbd5e1; line-height: 1.6; }

/* Visibility Helper */
[hidden] { display: none !important; }

button{
    margin: 20px;
    width: 12%;
    
}


