@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;700&display=swap');

:root {
    --primary: #009999;
    --primary-hover: #008080;
    --secondary: #d4cd00;
    --background: #0f2323;
    --surface: #1a3838;
    --text: #ffffff;
    --text-muted: #a0aec0;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    text-align: center;
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    margin: 0;
    background-image: radial-gradient(circle at top right, rgba(0, 153, 153, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(212, 205, 0, 0.05), transparent 40%);
}

.hidden {
    display: none !important;
}

h1 {
    font-weight: 900;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Fix for the explanation box in Dark Mode */
#explanation {
    background-color: var(--surface) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    color: white !important;
}

#explanation h4 {
    color: var(--secondary) !important;
}

#explanation p {
    color: rgba(255, 255, 255, 0.8) !important;
}

#teamForm {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    color: white;
    padding: 1rem 1.5rem;
    height: auto;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 153, 153, 0.1);
    color: white;
}

.btn-primary {
    background-color: var(--primary);
    border: none;
    border-radius: 1.25rem;
    padding: 1rem 2.5rem;
    font-weight: 800;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 153, 153, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 153, 153, 0.4);
}

.btn-danger {
    background-color: #e53e3e;
    border: none;
    border-radius: 1.25rem;
    padding: 1rem 2.5rem;
    font-weight: 800;
}

.clock {
    width: 200px;
    height: 200px;
    position: relative;
    margin: 30px;
    display: inline-block;
    background-image: url('clock.png');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border: 6px solid var(--surface);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.clock:hover {
    transform: scale(1.1);
}

.hand {
    width: 4px;
    height: 35%;
    background: #111;
    position: absolute;
    top: 15%;
    left: 50%;
    transform-origin: bottom;
    transform: translateX(-50%);
    border-radius: 4px;
    z-index: 5;
}

.clock::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #111;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.teamName {
    padding: 8px 16px;
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 800;
    background: var(--surface) !important;
    border-radius: 1rem !important;
    color: var(--secondary) !important;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    width: auto !important;
}

/* Winner Card Styles */
.winner-card {
    max-width: 600px;
    margin: 0 auto;
}

.table-dark {
    background: transparent;
}

.modal-content {
    background: var(--surface);
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-header,
.modal-footer {
    border-color: rgba(255, 255, 255, 0.05);
}

.close {
    color: white;
}