:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --success-color: #10b981;
    --border-radius: 16px;
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

header {
    text-align: center;
    margin-bottom: 10px;
}

header h1 {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 5px;
}

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

/* Card Style */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
}

/* Time Input & Controls */
.time-input-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

input[type="time"] {
    background-color: #0f172a;
    border: 1px solid #334155;
    color: #fff;
    padding: 12px 16px;
    font-size: 1.2rem;
    border-radius: 8px;
    outline: none;
    flex: 1;
    min-width: 150px;
}

input[type="time"]:focus {
    border-color: var(--accent-color);
}

.btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-hover);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.alarm-display {
    color: var(--text-secondary);
    font-size: 1rem;
}

.alarm-display strong {
    color: var(--accent-color);
}

/* Alarm Banner */
.alarm-banner {
    background-color: var(--danger-color);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    animation: flash 1s infinite alternate;
}

@keyframes flash {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.85;
        transform: scale(1.01);
    }
}

.pulse-alarm {
    font-size: 1.8rem;
    font-weight: 800;
}

/* Chess Board Area */
.challenge-box {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.status-info span {
    text-transform: uppercase;
    font-size: 0.8rem;
    opacity: 0.9;
}

.status-info h3 {
    font-size: 1.4rem;
    margin-top: 4px;
}

.board-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chess-board {
    width: 100%;
}

.board-placeholder {
    position: absolute;
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
    border: 2px dashed #334155;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-controls {
    text-align: center;
    margin-top: 16px;
}

.hint-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Utilities */
.hidden {
    display: none !important;
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .pulse-alarm {
        font-size: 1.4rem;
    }
}