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

body {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container {
    text-align: center;
    z-index: 10;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(255, 50, 50, 0.5);
    max-width: 90%;
    margin: 20px;
    border: 2px solid rgba(255, 50, 50, 0.3);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 50, 50, 0.7);
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: #ffa0a0;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin: 25px 0;
}

.stat-box {
    background: rgba(60, 0, 0, 0.7);
    border-radius: 10px;
    padding: 15px 25px;
    min-width: 180px;
    border: 1px solid rgba(255, 50, 50, 0.3);
    box-shadow: 0 0 15px rgba(255, 50, 50, 0.3);
}

.stat-value {
    font-size: 2.8rem;
    font-weight: bold;
    margin: 10px 0;
    color: #ff5555;
    text-shadow: 0 0 10px rgba(255, 85, 85, 0.7);
}

.stat-label {
    font-size: 1.1rem;
    color: #ffa0a0;
}

.warning {
    color: #ff5555;
    font-weight: bold;
    margin-top: 15px;
    font-size: 1.2rem;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.controls {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(255, 65, 108, 0.4);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 65, 108, 0.6);
}

button:active {
    transform: translateY(1px);
}

button:disabled {
    background: linear-gradient(to right, #666, #888);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.stress-indicator {
    width: 80%;
    height: 20px;
    background: rgba(60, 0, 0, 0.7);
    border-radius: 10px;
    margin: 25px auto;
    overflow: hidden;
    border: 1px solid rgba(255, 50, 50, 0.3);
}

.stress-level {
    height: 100%;
    background: linear-gradient(to right, #00c853, #ffd600, #ff9100, #ff3d00, #d50000);
    width: 0%;
    transition: width 0.3s ease;
}

.settings {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

label {
    color: #ffa0a0;
    font-weight: bold;
}

input[type="range"] {
    width: 150px;
}

.value-display {
    color: #ff5555;
    font-weight: bold;
    min-width: 50px;
}

.footer {
    margin-top: 25px;
    font-size: 0.9rem;
    color: #ff8888;
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    .stat-box { min-width: 140px; padding: 10px 15px; }
    .stat-value { font-size: 2rem; }
}
