/* Standardized styling for Spatial Recall Trainer */

body {
    background-color: #f3f4f6;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Canvas & Screen styling */
.square-canvas {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1 / 1;
    background-color: #000000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: block;
}

.black-screen {
    background-color: #000000;
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 20px auto;
    border-radius: 8px;
}

/* Prevent layout jumping in instructions */
.instruction-box {
    min-height: 4.5rem; /* Holds space stable when text toggles */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Fixed container space for timer & input controls */
.controls-slot {
    min-height: 85px; /* Holds height whether displaying timer or input controls */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Canvas container wrapper to prevent canvas reflow jumps */
.canvas-wrapper {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 1.5rem auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    outline: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}
.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #6b7280;
    color: #ffffff;
}
.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-success {
    background-color: #16a34a;
    color: #ffffff;
}
.btn-success:hover {
    background-color: #15803d;
}

.btn-danger {
    background-color: #dc2626;
    color: #ffffff;
}
.btn-danger:hover {
    background-color: #b91c1c;
}

/* Card Container */
.card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .card {
        padding: 1.5rem;
    }
}