* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0b0c10;
    color: #c5c6c7;
    font-family: 'Roboto', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

h1, h2, .logo, .score-board {
    font-family: 'Orbitron', sans-serif;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    padding: 20px 40px;
    align-items: center;
    transition: opacity 0.5s;
}

.hidden {
    display: none !important;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: #66fcf1;
    text-shadow: 0 0 10px rgba(102, 252, 241, 0.7);
}

.stats {
    display: flex;
    gap: 30px;
    align-items: center;
    font-size: 1.5rem;
}

.timer {
    color: #fce366;
    text-shadow: 0 0 8px rgba(252, 227, 102, 0.7);
}

.score-board {
    color: #ff007f;
    text-shadow: 0 0 8px rgba(255, 0, 127, 0.7);
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(11, 12, 16, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: auto;
}

.overlay h1 {
    font-size: 5rem;
    color: #66fcf1;
    text-shadow: 0 0 20px rgba(102, 252, 241, 0.8);
    margin-bottom: 20px;
    text-align: center;
}

.overlay p {
    font-size: 1.5rem;
    color: #c5c6c7;
    margin-bottom: 40px;
    text-align: center;
}

.l-btn {
    background: #45a29e;
    color: #0b0c10;
    border: none;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.2s ease;
    box-shadow: 0 0 15px rgba(69, 162, 158, 0.6);
}

.l-btn:hover {
    background: #66fcf1;
    box-shadow: 0 0 25px rgba(102, 252, 241, 0.8);
    transform: scale(1.05);
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 40px 40px 40px;
}

.glass {
    background: rgba(11, 12, 16, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(102, 252, 241, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px;
    pointer-events: auto;
}

.task-panel {
    max-width: 450px;
    animation: slideInLeft 0.5s ease-out;
}

.task-panel h2 {
    color: #ff007f;
    margin-bottom: 10px;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 0, 127, 0.5);
}

.points-display {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.point-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 4px solid #66fcf1;
    font-size: 1.1rem;
    font-weight: 500;
}

.input-panel {
    align-self: center;
    width: 60%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    animation: slideInUp 0.5s ease-out;
}

.input-group {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 15px;
}

.function-label {
    font-size: 1.8rem;
    color: #66fcf1;
    font-family: 'Orbitron', monospace;
}

#formula-input {
    flex-grow: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(102, 252, 241, 0.4);
    color: #fff;
    font-size: 1.5rem;
    padding: 12px 20px;
    border-radius: 8px;
    outline: none;
    font-family: 'Roboto', monospace;
    transition: all 0.3s ease;
}

#formula-input:focus {
    border-color: #66fcf1;
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.3);
    background: rgba(255,255,255,0.1);
}

#run-btn {
    background: #ff007f;
    color: #0b0c10;
    border: none;
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.6);
}

#run-btn:hover {
    background: #ff4da6;
    box-shadow: 0 0 20px rgba(255, 77, 166, 0.8);
    transform: translateY(-2px);
}

#run-btn:disabled {
    background: #333;
    color: #666;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.message {
    font-size: 1.2rem;
    min-height: 24px;
    font-weight: bold;
    text-align: center;
    transition: opacity 0.3s;
    opacity: 0;
}
.message.show { opacity: 1; }
.message.success { color: #5cfc66; text-shadow: 0 0 8px #5cfc66; }
.message.error { color: #fc6666; text-shadow: 0 0 8px #fc6666; }

#graph-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}