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

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.form-title {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

form {
    margin-bottom: 1.5rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: #6b7280;
}

input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

label {
    position: absolute;
    left: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    transition: all 0.2s;
    pointer-events: none;
}

input:focus ~ label,
input:not(:placeholder-shown) ~ label {
    top: 0;
    font-size: 0.75rem;
    color: #4f46e5;
    background-color: #ffffff;
    padding: 0 0.25rem;
}

.btn {
    width: 100%;
    padding: 0.75rem;
    background-color: #4f46e5;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #4338ca;
}

.recover {
    text-align: right;
    margin-bottom: 1rem;
}

.recover a {
    color: #4f46e5;
    text-decoration: none;
    font-size: 0.875rem;
}

.recover a:hover {
    text-decoration: underline;
}

.or {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.or::before,
.or::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background-color: #d1d5db;
}

.or::before {
    left: 0;
}

.or::after {
    right: 0;
}

.icons {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icons i {
    font-size: 1.5rem;
    margin: 0 0.5rem;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s;
}

.icons i:hover {
    color: #4f46e5;
}

.links {
    text-align: center;
    margin-top: 1rem;
}

.links p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.links button {
    background: none;
    border: none;
    color: #4f46e5;
    font-size: 0.875rem;
    cursor: pointer;
}

.links button:hover {
    text-decoration: underline;
}

.messageDiv {
    background-color: #f87171;
    color: #ffffff;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    opacity: 0;
    animation: fadeOut 7s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* Admin styles */
.admin-container {
    background: #f4f7f6;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    max-width: none;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.admin-header h1 {
    color: #333;
    font-size: 24px;
}

.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.player-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.player-card:hover {
    transform: translateY(-5px);
}

.player-card h3 {
    color: #4f46e5;
    margin-bottom: 10px;
}

.player-info p {
    margin: 5px 0;
    color: #4b5563;
}

.player-actions {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

.btn-primary, .btn-secondary, .btn-logout {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.875rem;
    width: auto;
}

.btn-primary {
    background-color: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-secondary {
    background-color: #9ca3af;
    color: white;
    margin-left: 10px;
}

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

.btn-logout {
    background-color: #ef4444;
    color: white;
}

.btn-logout:hover {
    background-color: #dc2626;
}

/* Existing styles remain the same */

.dashboard-title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.player-info, .player-stats {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.player-info h2, .player-stats h2 {
    color: #333;
    margin-bottom: 15px;
}

.player-info p, .player-stats p {
    margin: 10px 0;
    color: #666;
}

.player-info strong, .player-stats strong {
    color: #333;
}

/* Existing styles remain the same */

/* Dropdown specific styles */
select {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    color: #333; /* Ensure text is visible */
}

select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Adjust label for select */
.input-group select ~ label {
    background-color: transparent;
    transform: translateY(-50%);
    top: 50%;
}

.input-group select:focus ~ label,
.input-group select:not(:invalid) ~ label {
    top: -0.5rem;
    font-size: 0.75rem;
    color: #4f46e5;
    background-color: #ffffff;
    padding: 0 0.25rem;
    transform: translateY(0);
}

/* Style for disabled option */
select option[disabled] {
    color: #9ca3af;
}

/* Improve input and select hover states */
input:hover,
select:hover {
    border-color: #9ca3af;
}

/* Consistent styling for inputs and selects */
input,
select {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
}

/* Improve label positioning */
.input-group label {
    background-color: transparent;
    transition: all 0.2s ease-in-out;
    transform: translateY(-50%);
    top: 50%;
}

input:focus ~ label,
input:not(:placeholder-shown) ~ label,
select:focus ~ label,
select:not(:invalid) ~ label {
    top: -0.5rem;
    font-size: 0.75rem;
    color: #4f46e5;
    background-color: #ffffff;
    padding: 0 0.25rem;
    z-index: 1;
    transform: translateY(0);
}

/* Enhance focus states */
input:focus,
select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Improve placeholder contrast */
::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Enhance button styles */
.btn {
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.sorting-buttons {
    display: flex;
    gap: 10px;
}
.btn-sort {
    background-color: #17a2b8;
    color: white;
}
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .sorting-buttons {
        margin: 10px 0;
    }
}
/* Responsive adjustments */
@media (max-width: 480px) {
    input,
    select,
    .btn {
        font-size: 0.875rem;
    }

    .input-group i {
        font-size: 1rem;
    }
}



@media (max-width: 768px) {
    .player-grid {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-header h1 {
        margin-bottom: 10px;
    }

    .btn-logout {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    input, .btn {
        font-size: 0.875rem;
    }

    .player-card {
        padding: 15px;
    }

    .player-actions {
        flex-direction: column;
    }

    .player-actions .btn {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Additional styles for better UI */
.input-group i {
    font-size: 1.2rem;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.5);
}

.player-info {
    font-size: 0.9rem;
}

.player-card h3 {
    font-size: 1.2rem;
}

/* Improve visibility of the or separator */
.or {
    font-weight: bold;
    color: #4b5563;
}

/* Style for form error messages */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Transition for smooth form switching */
#signup, #signIn {
    transition: opacity 0.3s ease-in-out;
}

/* Styles for the admin page content */
.admin-main {
    margin-top: 2rem;
}

/* Improve button spacing in player actions */
.player-actions .btn + .btn {
    margin-left: 0.5rem;
}

/* Add a subtle hover effect to input fields */
input:hover {
    border-color: #9ca3af;
}

/* Style for success messages */
.success-message {
    background-color: #10b981;
    color: #ffffff;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* Improve visibility of links */
a {
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* Add some spacing to the bottom of the page for better scrolling experience */
body {
    padding-bottom: 2rem;
}

/* Style for disabled buttons */
.btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* Improve contrast for placeholder text */
::placeholder {
    color: #9ca3af;
}

/* Add a subtle transition to all interactive elements */
a, button, input {
    transition: all 0.2s ease-in-out;
}

/* Style for form labels when input is focused or filled */
input:focus ~ label,
input:not(:placeholder-shown) ~ label {
    background-color: #ffffff;
    padding: 0 0.25rem;
    z-index: 1;
}

.btn.secondary {
    background-color: #6b7280;
    margin-top: 1rem;
}

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