:root {
    --primary-color: #003366; /* Dark Blue */
    --secondary-color: #d3d3d3; /* Light Grey */
    --accent-color: #ff4136; /* Red */
    --text-color: #f4f4f4;
    --background-color: #1a1a1a;
    --border-radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

#app {
    width: 100%;
    max-width: 800px;
    background-color: #2a2a2a;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Login View */
#login-view {
    text-align: center;
}

#login-view h1 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

#login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--secondary-color);
    background-color: #333;
    color: var(--text-color);
    font-size: 1rem;
}

#login-form button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#login-form button:hover {
    background-color: #004488;
}

#admin-login-button {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color: 0.3s ease;
}

#admin-login-button:hover {
    background-color: #cc0000;
}

.or-separator {
    text-align: center;
    margin: 1rem 0;
    font-weight: bold;
    color: var(--secondary-color);
}

.error-message {
    color: var(--accent-color);
    margin-top: 10px;
    height: 1.2em;
}

/* Auth View */
#auth-view a {
    color: var(--accent-color);
    text-decoration: none;
}
#auth-view a:hover {
    text-decoration: underline;
}

#auth-view h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

#auth-view form input {
     width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--secondary-color);
    background-color: #333;
    color: var(--text-color);
    font-size: 1rem;
}

#auth-view form button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#auth-view form button:hover {
     background-color: #004488;
}

#auth-view p {
    text-align: center;
    margin-top: 1rem;
}

/* Draft View */
#draft-view header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#logout-button, #admin-logout-button {
    padding: 8px 12px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

#logout-button:hover, #admin-logout-button:hover {
    background-color: #cc0000;
}

#draft-view h1 {
    font-size: 2rem;
}

#draft-view h2 {
    margin-bottom: 1rem;
}

/* Teams Container */
.team {
    background-color: #333;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    overflow: hidden;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    background-color: #3c3c3c;
    transition: background-color 0.3s ease;
}

.team-header:hover {
    background-color: #444;
}

.team-header::after {
    content: '▼';
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.team.active .team-header::after {
    transform: rotate(180deg);
}

.player-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.team.active .player-list {
    max-height: 500px; /* Adjust as needed */
    transition: max-height 0.4s ease-in;
}

.player-list ul {
    list-style-type: none;
    padding: 0 15px 15px;
}

.player-list li {
    padding: 10px;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-list li:last-child {
    border-bottom: none;
}

.player-list li.picked {
    color: #888;
    text-decoration: line-through;
}

.player-list li.picked .pick-button {
    display: none;
}

.player-position {
    color: var(--secondary-color);
    font-style: italic;
    margin-left: 1rem;
}

.player-info {
    display: flex;
    align-items: center;
}

.pick-button {
    padding: 5px 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.pick-button:hover {
    background-color: #004488;
}

.pick-button:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.user-picks-section {
    background-color: #333;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.user-picks-section h2 {
    margin-bottom: 1rem;
    border-bottom: 1px solid #555;
    padding-bottom: 0.5rem;
}

#user-picks-list {
    list-style-type: none;
    padding: 0;
}

#user-picks-list li {
    background-color: #3a3a3a;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

.turn-indicator {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Admin View */
#admin-view header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 1rem;
}

#admin-view h1 {
    font-size: 2rem;
    color: var(--accent-color);
}

.admin-section {
    background-color: #333;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.admin-section h2 {
    margin-bottom: 1rem;
    border-bottom: 1px solid #555;
    padding-bottom: 0.5rem;
}

#admin-users-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.admin-user-card {
    background-color: #2a2a2a;
    padding: 1rem;
    border-radius: var(--border-radius);
}

.admin-user-card h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.admin-user-card ul {
    list-style-type: none;
    padding-left: 0;
}

.admin-user-card li {
    background-color: #383838;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

#draft-log-list {
    list-style-type: none;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

#draft-log-list li {
    padding: 8px;
    border-bottom: 1px solid #444;
}
#draft-log-list li:nth-child(odd) {
    background-color: #3a3a3a;
}

/* Utility */
.hidden {
    display: none;
}