* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Countdown Timer Styles */
#registration-status {
    margin-bottom: 2rem;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#countdown-timer {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
    gap: 1.5rem;
}

.time-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.time-section span:first-child {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a3c5a;
}

.time-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.player-count-container {
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1a3c5a;
    padding: 0.5rem;
    background-color: #e9ecef;
    border-radius: 4px;
    display: inline-block;
}

#current-player-count {
    font-weight: 700;
    color: #4CAF50;
}

#max-player-count {
    font-weight: 700;
}

#registration-closed, #registration-not-open {
    padding: 1rem;
    border-radius: 6px;
}

/* Random Picker Winner Styles */
#picked-player {
    position: relative;
    display: inline-block;
    animation: bounce 0.5s ease infinite alternate;
}

#picked-player .emoji {
    display: inline-block;
    margin-left: 15px;
    animation: party 2s ease infinite, float 3s ease-in-out infinite;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

@keyframes party {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(10deg); }
    50% { transform: scale(1) rotate(0deg); }
    75% { transform: scale(1.2) rotate(-10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Animation for the name cycling */
#picking-name {
    transition: all 0.3s ease-out;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#registration-closed {
    background-color: #f8d7da;
    color: #721c24;
}

#registration-not-open {
    background-color: #fff3cd;
    color: #856404;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.captcha-container {
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f8f9fa;
}

.captcha-hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a3c5a;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

.mmr-group {
    flex: 1;
}

.form-row button {
    width: 150px;
    height: 45px;
    margin-bottom: 5px;
}

.note {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.3rem;
    font-style: italic;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

#message {
    margin-top: 1.5rem;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.success {
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}

.error {
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}

.warning {
    background-color: #fcf8e3;
    border: 1px solid #faebcc;
    color: #8a6d3b;
}

.hidden {
    display: none;
}

.admin-link {
    margin-top: 2rem;
    text-align: center;
}

.admin-link a {
    color: #1a3c5a;
    text-decoration: none;
}

.admin-link a:hover {
    text-decoration: underline;
}

/* Button styling fixes */
.btn-outline-secondary {
    background-color: transparent !important;
}

.btn-outline-secondary:focus,
.btn-outline-secondary.focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active {
    background-color: #6c757d !important;
    color: #fff !important;
}

.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,
.btn-outline-secondary:not(:disabled):not(.disabled).active:focus {
    box-shadow: none !important;
}

/* Specific fix for edit buttons */
.edit-player-btn {
    transition: all 0.2s ease;
}

.edit-player-btn:focus,
.edit-player-btn.focus,
.edit-player-btn:active,
.edit-player-btn.active,
.edit-player-btn.show {
    background-color: transparent !important;
    color: #6c757d !important;
    box-shadow: none !important;
}

/* Fix for modal backdrop issues */
.modal-backdrop.show {
    opacity: 0.5;
}

/* Fix for button focus states after modal close */
button:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Disabled form styles */
.disabled-form {
    opacity: 0.7;
    pointer-events: none;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    position: relative;
}

.disabled-form::before {
    content: "Registration Closed";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    color: #721c24;
    border: 2px solid #f5c6cb;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.hidden {
    display: none !important;
}
