/* Custom styles for the game application */

/* Base styling enhancements */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Memory game specific styles */
.sequence-number {
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.sequence-number.highlight {
    transform: scale(1.2);
    box-shadow: 0 0 20px var(--bs-warning);
    animation: pulse 0.8s ease-in-out;
}

.memory-btn {
    transition: all 0.2s ease;
    margin: 2px;
}

.memory-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.memory-btn:active {
    transform: scale(0.95);
}

/* Analog Clock Styling */
.analog-clock {
    width: 300px;
    height: 300px;
    position: relative;
    background: white;
    border-radius: 50%;
    border: 8px solid var(--bs-dark);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.clock-face {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Numbers on the clock */
.number {
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    color: var(--bs-dark);
    user-select: none;
}

.number-12 {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.number-3 {
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
}

.number-6 {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.number-9 {
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
}

/* Hour marks */
.hour-marks::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 50%;
    width: 4px;
    height: 30px;
    background: var(--bs-dark);
    transform: translateX(-50%);
    box-shadow: 
        0 120px 0 var(--bs-dark), 
        0 240px 0 var(--bs-dark),
        120px 120px 0 var(--bs-dark),
        -120px 120px 0 var(--bs-dark),
        85px 35px 0 var(--bs-secondary),
        -85px 35px 0 var(--bs-secondary),
        85px 205px 0 var(--bs-secondary),
        -85px 205px 0 var(--bs-secondary),
        35px 85px 0 var(--bs-secondary),
        -35px 85px 0 var(--bs-secondary),
        35px 155px 0 var(--bs-secondary),
        -35px 155px 0 var(--bs-secondary);
}

/* Clock hands */
.hand {
    position: absolute;
    background: var(--bs-dark);
    transform-origin: bottom center;
    border-radius: 3px;
    transition: transform 0.2s ease;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hour-hand {
    width: 6px;
    height: 80px;
    left: 50%;
    bottom: 50%;
    transform: translateX(-50%) rotate(0deg);
    background: var(--bs-primary);
}

.minute-hand {
    width: 4px;
    height: 110px;
    left: 50%;
    bottom: 50%;
    transform: translateX(-50%) rotate(0deg);
    background: var(--bs-warning);
}

.center-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--bs-dark);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.analog-clock:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* Clock and time input styling */
input[type="time"] {
    font-size: 1.5rem;
    text-align: center;
    padding: 1rem;
}

/* Stage progress indicators */
.stage-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.stage-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bs-secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.stage-indicator.active {
    background-color: var(--bs-warning);
    color: var(--bs-dark);
    transform: scale(1.2);
}

.stage-indicator.completed {
    background-color: var(--bs-success);
}

/* Animation for transitions */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Card enhancements */
.card {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Button enhancements */
.btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Form enhancements */
.form-control {
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--bs-warning);
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.form-control.is-invalid {
    border-color: var(--bs-danger);
    animation: shake 0.5s ease-in-out;
}

/* Textarea specific */
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Alert improvements */
.alert {
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Admin dashboard enhancements */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background-color: var(--bs-dark);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(255, 193, 7, 0.1);
}

/* Modal enhancements */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-info));
    color: white;
    border-radius: 15px 15px 0 0;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 193, 7, 0.3);
    border-top: 4px solid var(--bs-warning);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .memory-btn, .sequence-number {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
    }
}

@media (max-width: 576px) {
    .sequence-number {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
        margin: 5px;
    }
    
    .memory-btn {
        width: 45px !important;
        height: 45px !important;
        font-size: 1rem !important;
        margin: 1px;
    }
}

/* Print styles */
@media print {
    .btn, .alert, .modal { display: none !important; }
    body { color: black !important; background: white !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}
