@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #e9eff6;
    --text-color: #0f172a;
    --primary: #0e73c3;
    --secondary: #0c62a5;
    --card-bg: #ffffff;
    --hover-bg: #cbd5e1;
    --modal-bg: #ffffff;
    --border-color: #b2c4d9;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 1.25rem 2rem;
}

.header-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.site-logo {
    display: block;
    max-height: 80px;
    width: auto;
    object-fit: contain;
    margin: 0 auto 1rem auto;
}

.header-brand .site-logo {
    max-height: 70px;
    margin: 0;
}

.header-brand h1 {
    margin: 0 !important;
    line-height: 1.2 !important;
}

.admin-sidebar .site-logo {
    max-height: 70px;
    margin: 1rem auto 1.5rem auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    text-shadow: none;
}

nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    position: relative;
}

.nav-right-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 769px) {
    .nav-right-actions {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
}

@media (max-width: 768px) {
    .nav-right-actions {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

nav a:hover,
nav a.active {
    background-color: var(--primary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
    color: var(--active-text-color, #ffffff);
}

/* Grids */
.players-grid,
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

/* Card */
.card {
    background: #1d73c3;
    border-radius: 1rem;
    overflow: hidden;
    backdrop-filter: blur(12px);
    border: 1px solid #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-img-container {
    width: fit-content;
    max-width: 100%;
    aspect-ratio: 1;
    min-height: 200px;
    margin: 0 auto;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalOverlay .card-img-container {
    width: auto;
    max-width: 100%;
    max-height: 480px;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalOverlay .card-img-container img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 480px;
    object-fit: contain;
    object-position: top;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

.card:hover img {
    transform: scale(1.05);
}

.card-info {
    padding: 1.5rem;
    text-align: center;
    background-color: #0e73c3;
    color: #ffffff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    line-height: 1.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-info p {
    color: rgba(255, 255, 255, 0.8) !important;
}

.badge-short {
    display: none;
}

.badge-full {
    display: inline;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: rgba(0, 0, 0, 0.05);
}

.badge.pool {
    background-color: #e9eff6;
    color: var(--primary);
    border: 1px solid var(--border-color);
}

.badge.sold {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.badge.unsold {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-available {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

/* Sticky Button */
.sticky-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    z-index: 100;
}

.sticky-btn:hover {
    transform: scale(1.1);
}

/* Edit / Penalty Modals */
.modal-overlay.active-penalty,
.modal-overlay.active-success,
.modal-overlay.active-edit,
.modal-overlay.active-lot {
    opacity: 1;
    pointer-events: all;
    z-index: 2000;
}

/* Lot draw */
.lot-draw-modal {
    max-width: 520px;
    text-align: center;
}

.lot-team-select {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.lot-team-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.lot-team-option:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.lot-team-option:has(input:checked) {
    border-color: var(--primary);
    background: #e9eff6;
}

.lot-team-option input {
    accent-color: var(--primary);
    flex-shrink: 0;
    margin: 0;
}

.lot-team-option img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #cbd5e1;
}

.lot-team-option span {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-color);
}

.lot-select-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.lot-link-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.lot-link-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    text-decoration: none;
}

.lot-reel-window {
    position: relative;
    height: 100px;
    margin: 0 auto 1.5rem;
    max-width: 100%;
    overflow: hidden;
    border-radius: 1rem;
    background: #0f172a;
    border: 2px solid var(--primary);
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Removed reel window overlay gradients for a flat look */

.lot-reel-name {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 1rem;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text-color);
    transition: transform 0.08s ease, color 0.3s ease, text-shadow 0.3s ease;
}

.lot-reel-name.is-spinning {
    animation: lot-name-pulse 0.12s ease-in-out infinite alternate;
    color: var(--secondary);
}

.lot-reel-name.is-winner {
    animation: lot-winner-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    color: #ffffff;
    font-size: 1.35rem;
}

.lot-reel-window.is-winner-glow {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(14, 115, 195, 0.2), inset 0 0 24px rgba(0, 0, 0, 0.02);
    animation: lot-glow 1.2s ease-in-out infinite alternate;
}

.lot-winner-label {
    margin: -0.5rem 0 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
}

.lot-pick-btn {
    width: 100%;
}

.lot-pick-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@keyframes lot-name-pulse {
    from {
        transform: scale(0.98);
        opacity: 0.85;
    }

    to {
        transform: scale(1.02);
        opacity: 1;
    }
}

@keyframes lot-winner-pop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }

    70% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes lot-glow {
    from {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.25), inset 0 0 24px rgba(0, 0, 0, 0.4);
    }

    to {
        box-shadow: 0 0 40px rgba(251, 191, 36, 0.45), inset 0 0 24px rgba(0, 0, 0, 0.4);
    }
}

.budget-list {
    text-align: left;
    margin-top: 1rem;
    color: #94a3b8;
}

.budget-list div {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}



.card-info p {
    color: rgba(255, 255, 255, 0.8) !important;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: rgba(255, 255, 255, 0.1);
}

.badge.pool {
    background-color: rgba(212, 175, 55, 0.15);
    color: #ffe27a;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.badge.sold {
    background-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid #10b981;
}

.badge.unsold {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Popup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2000;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--modal-bg);
    border-radius: 1.5rem;
    width: 95%;
    max-width: 600px;
    padding: 2rem;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    max-height: 90vh;
    overflow-y: auto;
}

#modalOverlay .modal {
    width: 80% !important;
    max-width: 80% !important;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--text-color);
}

.modal-content h2 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.modal-content .player-meta {
    margin-bottom: 2rem;
    color: #94a3b8;
}

.teams-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.team-btn {
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 600;
}

.team-btn img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.team-btn:hover {
    background: #e2e8f0;
}

.team-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.team-btn.selected {
    border-color: var(--primary);
    background: #e9eff6;
    box-shadow: 0 0 10px rgba(14, 115, 195, 0.1);
}

.auction-form {
    display: none;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.3s forwards;
}

.auction-form.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-field {
    background: rgba(0, 0, 0, 0.05);
    /* Lighter bg so it's visible in both modes naturally, or transparent */
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 0.5rem;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
}

.submit-btn {
    background: var(--primary);
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    color: #ffffff;
    font-family: inherit;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: var(--secondary);
}

/* Filter */
.filters {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.filters-pools {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.filters-pools .filters-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 0.75rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-family: inherit;
}

.filter-btn.active {
    background: var(--primary);
    color: var(--active-text-color, #ffffff);
}

/* Pool Section Additions */
.pool-section {
    margin-bottom: 3rem;
}

.pool-heading {
    margin-bottom: 1.5rem;
}

.pool-pricing {
    margin: 0.25rem 0 0.75rem;
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 500;
}

.pool-heading h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.pool-heading hr {
    border: none;
    height: 2px;
    background: var(--primary);
    opacity: 0.3;
    width: 100%;
}

/* Theme Switch */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin: 0 5px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: .4s;
}

.theme-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: var(--text-color);
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
    background-color: #fff;
}

.slider.round {
    border-radius: 34px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    header nav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    nav a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .players-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .card-info h3 {
        font-size: 0.95rem !important;
        height: auto !important;
        line-height: 1.25rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .card-info p {
        font-size: 0.75rem !important;
        margin-bottom: 0.25rem !important;
    }

    .badge-full {
        display: none !important;
    }

    .badge-short {
        display: inline !important;
    }

    .badge {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        font-size: 0.7rem !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        font-weight: 700 !important;
        border-radius: 0 !important;
    }

    .badge.pool {
        color: #ffe27a !important;
    }

    .badge.sold {
        color: #6ee7b7 !important;
    }

    .badge.unsold {
        color: #fca5a5 !important;
    }

    .badge-available {
        color: #cbd5e1 !important;
    }

    .modal {
        padding: 1.5rem;
    }

    #modalOverlay .modal {
        width: 95% !important;
        max-width: 95% !important;
    }

    /* Force 1-column layout for Auction Modal on mobile */
    .modal-content {
        display: block !important;
    }

    .modal-content>div:first-child {
        margin-bottom: 2rem;
    }

    .team-header {
        flex-direction: column;
        text-align: center;
    }

    .team-banner {
        padding: 1rem;
    }

    .sticky-btn {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
    }

    .lot-team-select {
        grid-template-columns: 1fr;
    }

    .lot-reel-name {
        font-size: 1rem;
    }

    .filters:not(.filters-pools) {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .filters-pools .filters-row {
        gap: 0.4rem 0.5rem;
    }

    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    /* Fix header absolute items on small screens */
    header {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    header nav div[style*="position:absolute"] {
        position: static !important;
        justify-content: center;
        margin-top: 1rem;
    }

    .login-card {
        padding: 1.5rem !important;
        margin: 2rem 1rem !important;
    }
}

@media (max-width: 480px) {
    .modal-content h2 {
        font-size: 1.5rem;
    }

    .team-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Frontend Player Login, Profile & Admin Login styling - Black, Red and Golden Theme */
.frontend-login-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 2rem 0;
}

.frontend-profile-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    width: 100%;
    padding: 2rem 0;
}

@media (min-width: 992px) {
    .frontend-profile-wrapper {
        display: grid;
        grid-template-columns: 65fr 35fr;
        gap: 2rem;
        align-items: start;
        max-width: 1200px;
        margin: 0 auto;
    }

    .frontend-profile-card {
        max-width: none !important;
    }
}

.frontend-login-card,
.frontend-profile-card,
.login-card {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 2.5rem;
    width: 100%;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.4s ease-out;
}

.frontend-login-card,
.frontend-profile-card {
    max-width: 550px;
}

.login-card {
    max-width: 400px;
    margin: 5rem auto;
    text-align: center;
}

.frontend-login-card h2,
.frontend-profile-card h2,
.login-card h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--text-color);
}

.frontend-login-card p,
.frontend-profile-card p.subtitle {
    color: #a1a1aa;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-label,
.checkbox-group-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffe27a;
    /* Gold labels */
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 0 8px rgba(255, 226, 122, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 580px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

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

/* Styled checkbox options */
.frontend-login-card .checkbox-item {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
}

.frontend-profile-card .checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #000000;
    border: 1px solid rgba(185, 28, 28, 0.3);
    /* Subtle red border */
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.frontend-profile-card .checkbox-item:hover {
    background: rgba(185, 28, 28, 0.08);
    border-color: #d4af37;
    /* Gold focus border on hover */
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

.frontend-profile-card .checkbox-item input[type="checkbox"] {
    accent-color: #ef4444;
    /* Bright red checkbox indicator */
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

.frontend-profile-card .checkbox-item span {
    font-size: 0.95rem;
    color: #e4e4e7;
    transition: color 0.2s;
}

.frontend-profile-card .checkbox-item.checked {
    background: rgba(185, 28, 28, 0.15);
    /* Red tinted background */
    border-color: #ef4444;
    /* Glowing red border */
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.frontend-profile-card .checkbox-item.checked span {
    color: #ffe27a;
    /* Gold text when selected */
    font-weight: 600;
}

/* Input Fields inside theme forms */
.frontend-login-card .input-field,
.frontend-profile-card .input-field,
.login-card .input-field {
    background: #000000 !important;
    border: 1px solid rgba(185, 28, 28, 0.4) !important;
    /* Subtle red border */
    padding: 1rem;
    border-radius: 0.5rem;
    color: #ffe27a !important;
    /* Elegant gold text input */
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.frontend-login-card .input-field::placeholder,
.frontend-profile-card .input-field::placeholder,
.login-card .input-field::placeholder {
    color: rgba(212, 175, 55, 0.4);
}

.frontend-login-card .input-field:focus,
.frontend-profile-card .input-field:focus,
.login-card .input-field:focus {
    outline: none;
    border-color: #d4af37 !important;
    /* Glowing gold border on focus */
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.35), inset 0 0 5px rgba(185, 28, 28, 0.2) !important;
}

/* Image Upload with Red & Gold Glows */
.frontend-profile-card .image-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #000000;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px dashed rgba(185, 28, 28, 0.4);
}

.frontend-profile-card .image-preview-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #d4af37;
    /* Gold ring */
    box-shadow: 0 0 15px rgba(185, 28, 28, 0.4);
    /* Glowing red shadow */
    flex-shrink: 0;
}

.frontend-profile-card .image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.frontend-profile-card .image-upload-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.frontend-profile-card .image-upload-btn-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffe27a;
    /* Golden button link */
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.frontend-profile-card .image-upload-btn-label:hover {
    color: #d4af37;
}

.frontend-profile-card .image-upload-hint {
    font-size: 0.75rem;
    color: #a1a1aa;
}

/* Buttons in the theme */
.frontend-login-card .submit-btn,
.frontend-profile-card .submit-btn,
.login-card .submit-btn {
    background: var(--primary);
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    color: #ffffff;
    font-family: inherit;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(14, 115, 195, 0.2);
    transition: all 0.3s ease;
}

.frontend-login-card .submit-btn:hover,
.frontend-profile-card .submit-btn:hover,
.login-card .submit-btn:hover {
    opacity: 1;
    background: var(--secondary);
    box-shadow: 0 6px 20px rgba(14, 115, 195, 0.3);
    transform: translateY(-2px);
}

.frontend-profile-card .btn-secondary-link {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 0.85rem;
    border-radius: 0.5rem;
    color: var(--text-color);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.frontend-profile-card .btn-secondary-link:hover {
    background: var(--hover-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.other-interest-input-wrapper {
    display: none;
    margin-top: -0.25rem;
    margin-bottom: 0.75rem;
    animation: fadeIn 0.25s forwards;
}

.other-interest-input-wrapper.active {
    display: block;
}

/* Red & Gold alert messages */
.frontend-login-card .alert-message,
.frontend-profile-card .alert-message {
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.frontend-login-card .alert-message.success,
.frontend-profile-card .alert-message.success {
    background: rgba(212, 175, 55, 0.15);
    /* Gold background tinted */
    color: #ffe27a;
    /* Gold text */
    border: 1px solid rgba(212, 175, 55, 0.35);
}

.frontend-login-card .alert-message.error,
.frontend-profile-card .alert-message.error {
    background: rgba(185, 28, 28, 0.15);
    /* Red background tinted */
    color: #fca5a5;
    /* Light red text */
    border: 1px solid rgba(185, 28, 28, 0.35);
}



/* Removed Light Theme overrides to activate Dark Theme */

/* Explicit overrides for Player Profile and Login wrappers & cards - Light Blue Theme */
.frontend-profile-wrapper,
.frontend-login-wrapper {
    background: transparent !important;
}

.frontend-profile-card,
.frontend-login-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
}

.frontend-profile-card h2,
.frontend-login-card h2 {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: var(--primary) !important;
    text-shadow: none !important;
}

.frontend-profile-card p.subtitle,
.frontend-login-card p {
    color: var(--text-color) !important;
    opacity: 0.8 !important;
}

.frontend-profile-card .form-label,
.frontend-login-card .form-label,
.frontend-profile-card .checkbox-group-title {
    color: var(--text-color) !important;
    opacity: 0.9 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    text-shadow: none !important;
}

.frontend-profile-card .input-field,
.frontend-login-card .input-field {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-color) !important;
}

.frontend-profile-card .input-field::placeholder,
.frontend-login-card .input-field::placeholder {
    color: var(--text-color) !important;
    opacity: 0.5 !important;
}

.frontend-profile-card .input-field:focus,
.frontend-login-card .input-field:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(14, 115, 195, 0.15) !important;
}

/* Checkbox items inside the profile card */
.frontend-profile-card .checkbox-item,
.frontend-login-card .checkbox-item {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

.frontend-profile-card .checkbox-item:hover,
.frontend-login-card .checkbox-item:hover {
    background: var(--hover-bg) !important;
    border-color: var(--border-color) !important;
    box-shadow: none !important;
}

.frontend-profile-card .checkbox-item input[type="checkbox"],
.frontend-login-card .checkbox-item input[type="checkbox"] {
    accent-color: var(--primary) !important;
}

.frontend-profile-card .checkbox-item span,
.frontend-login-card .checkbox-item span {
    color: var(--text-color) !important;
}

.frontend-profile-card .checkbox-item.checked,
.frontend-login-card .checkbox-item.checked {
    background: rgba(14, 115, 195, 0.08) !important;
    border-color: var(--primary) !important;
    box-shadow: none !important;
}

.frontend-profile-card .checkbox-item.checked span,
.frontend-login-card .checkbox-item.checked span {
    color: var(--primary) !important;
    font-weight: 600 !important;
}

/* Image Upload wrapper and preview overrides */
.frontend-profile-card .image-upload-wrapper {
    background: var(--hover-bg) !important;
    border: 1px dashed var(--border-color) !important;
}

.frontend-profile-card .image-preview-container {
    background: var(--card-bg) !important;
    border: 2px solid var(--primary) !important;
    box-shadow: 0 4px 12px rgba(14, 115, 195, 0.15) !important;
}

.frontend-profile-card .image-upload-btn-label {
    color: var(--primary) !important;
    text-decoration: underline !important;
}

.frontend-profile-card .image-upload-btn-label:hover {
    color: var(--secondary) !important;
}

.frontend-profile-card .image-upload-hint {
    color: var(--text-color) !important;
    opacity: 0.7 !important;
}

/* Button inside the Profile & Login Cards */
.frontend-profile-card .submit-btn,
.frontend-login-card .submit-btn {
    background: var(--primary) !important;
    border: none !important;
    color: var(--active-text-color, #ffffff) !important;
    font-weight: 800 !important;
    text-shadow: none !important;
    box-shadow: 0 4px 12px rgba(14, 115, 195, 0.2) !important;
}

.frontend-profile-card .submit-btn:hover,
.frontend-login-card .submit-btn:hover {
    background: var(--secondary) !important;
    box-shadow: 0 6px 16px rgba(14, 115, 195, 0.3) !important;
}

.frontend-profile-card .alert-message.success,
.frontend-login-card .alert-message.success {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.frontend-profile-card .alert-message.error,
.frontend-login-card .alert-message.error {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

#otpInput {
    font-family: 'Outfit', 'Courier New', Courier, monospace !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    letter-spacing: 0.3em !important;
    padding: 0.75rem !important;
}

/* Sidebar and Photo Collage Styling */
.profile-sidebar {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.profile-sidebar-card {
    background: #ffffff !important;
    border-radius: 1.5rem !important;
    padding: 2rem !important;
    width: 100%;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
    box-sizing: border-box;
}

.profile-sidebar-card .sidebar-title {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    margin-bottom: 1.5rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #0f172a !important;
    text-shadow: none !important;
    margin-top: 0 !important;
}

.photo-collage {
    column-count: 2;
    column-gap: 1rem;
    width: 100%;
}

.collage-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.collage-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #94a3b8;
    z-index: 10;
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Staggered Heights corresponding to masonry collage layout */
.collage-item.short {
    height: 140px;
}

.collage-item.medium {
    height: 180px;
}

.collage-item.tall {
    height: 240px;
}

/* Lightbox styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 3000;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s, color 0.2s;
    outline: none;
}

.lightbox-close:hover {
    color: var(--primary);
    transform: scale(1.1);
}

#modalOverlay .card-img-container img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

#modalOverlay .card-img-container img:hover {
    transform: scale(1.02);
}

/* Split layout for the player modal popup matching the mockup frame */
#modalOverlay .modal {
    padding: 0 !important;
    overflow: hidden !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 20px 40px rgba(14, 115, 195, 0.15) !important;
}

#modalOverlay .modal-content {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
    align-items: stretch !important;
}

/* Right block: pale blue background (#e9eff6), displays player image */
#modalOverlay .modal-content > div:first-child {
    order: 2 !important;
    background: #e9eff6 !important;
    padding: 3rem 2rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Left block: solid blue background (#0e73c3), displays white player details & white submit buttons */
#modalOverlay .modal-content > div:last-child {
    order: 1 !important;
    background: #0e73c3 !important;
    color: #ffffff !important;
    padding: 3rem 2rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* Text styles in details column */
#modalOverlay .modal-content > div:last-child h2 {
    color: #ffffff !important;
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
    font-weight: 800 !important;
}

#modalOverlay .modal-content > div:last-child h3 {
    color: #ffffff !important;
    margin-bottom: 1rem !important;
    font-size: 1.1rem !important;
    opacity: 0.9 !important;
}

#modalOverlay .modal-content .player-meta {
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 1.5rem !important;
}

#modalOverlay .modal-content #modalPlayerProfileArea {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 1.5rem !important;
}

/* Team Assignment buttons in details column (white semi-transparent background, white text) */
#modalOverlay .modal-content .team-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

#modalOverlay .modal-content .team-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

#modalOverlay .modal-content .team-btn.selected {
    border-color: #ffffff !important;
    background: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2) !important;
}

#modalOverlay .modal-content .team-btn.selected .team-max-bid {
    color: #ffffff !important;
    font-weight: bold !important;
}

/* Unsold button in details column */
#modalOverlay .modal-content .team-btn[data-teamid="UNSOLD"] {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
}

/* Price input field in details column */
#modalOverlay .modal-content .input-field {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

#modalOverlay .modal-content .input-field::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

#modalOverlay .modal-content .input-field:focus {
    border-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2) !important;
}

/* Confirm submit button in details column (White pill button with blue text) */
#modalOverlay .modal-content .submit-btn {
    background: #ffffff !important;
    color: #0e73c3 !important;
    border: none !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    border-radius: 9999px !important;
    padding: 0.75rem 2rem !important;
}

#modalOverlay .modal-content .submit-btn:hover {
    background: #e9eff6 !important;
    color: #0c62a5 !important;
}

/* Base Price box inside the image column (White surface card) */
#modalOverlay .modal-content > div:first-child > div:nth-child(2) {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03) !important;
    border-radius: 0.75rem !important;
    width: 100% !important;
}

#modalOverlay .modal-content #modalBasePriceLabel {
    color: #64748b !important;
}

#modalOverlay .modal-content #modalBasePrice {
    color: #074b83 !important;
}

#modalOverlay .modal-content #modalPoolRule {
    color: #64748b !important;
}

/* Modal close button: black on pale blue image container background */
#modalOverlay .close-btn {
    color: #0f172a !important;
}

#modalOverlay .close-btn:hover {
    color: var(--primary) !important;
}

/* Guest Modal Overrides */
#modalOverlay .modal.guest-modal-box {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 95% !important;
    max-width: 420px !important;
    padding: 0 !important;
    overflow: visible !important;
}

#modalOverlay .modal.guest-modal-box .close-btn {
    display: none !important;
}

#modalOverlay .modal-contents.guest-modal-content {
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    width: 100% !important;
}

#modalOverlay .modal-contents.guest-modal-content > div.guest-modal-card {
    order: unset !important;
    padding: 0 !important;
    display: block !important;
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 0.75 !important;
    border-radius: 1.5rem !important;
    overflow: hidden !important;
    background: #074b83 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75) !important;
    border: 2px solid rgba(255,255,255,0.15) !important;
}

#modalOverlay .modal-contents.guest-modal-content .card-img-container {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1 !important;
    padding: 0 !important;
}

#modalOverlay .modal-contents.guest-modal-content .card-img-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}



#modalOverlay .modal-contents.guest-modal-content .guest-modal-details-container {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    padding: 2rem !important;
    box-sizing: border-box !important;
    z-index: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    text-align: left !important;
    color: #ffffff !important;
}

#modalOverlay .modal-contents.guest-modal-content .guest-modal-details-container #modalBasePriceLabel {
    color: rgba(255, 255, 255, 0.6) !important;
}

#modalOverlay .modal-contents.guest-modal-content .guest-modal-details-container #modalBasePrice {
    color: #34d399 !important;
}

.modal-overlay .frontend-login-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    color: var(--text-color);
    margin-left: 0.5rem;
}

.theme-toggle-btn:hover {
    transform: scale(1.15) rotate(15deg);
    opacity: 0.8;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
    --bg-color: #0b132b;        /* Deep Navy Blue background */
    --card-bg: #1c2541;         /* Medium Navy Blue card background */
    --modal-bg: #1c2541;        /* Medium Navy Blue modal background */
    --border-color: #3a506b;    /* Slate/Navy Blue border color */
    --text-color: #ffffff;      /* White text color */
    --primary: #ffe27a;         /* Golden Yellow for active states */
    --secondary: #e5c158;       /* Slightly darker golden yellow for hover */
    --hover-bg: #2a3a5c;        /* Navy Blue hover background */
    --active-text-color: #0b132b; /* Black/Navy text on Golden background */
}

/* Heading/font overrides for dark mode to make headings golden yellow */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #ffe27a;
}

[data-theme="dark"] header h1 {
    color: #ffe27a !important;
}

[data-theme="dark"] .card-info h3 {
    color: #ffe27a !important;
}

[data-theme="dark"] .lot-team-option span {
    color: #0b132b !important;
}

[data-theme="dark"] .lot-link-btn {
    color: #0b132b !important;
}

/* Custom transitions for smoother theme toggling */
body, header, main, nav, a, button, select, input, textarea, .card, .modal, .modal-overlay, .rules-card, .team-banner, .lot-team-option, .lot-reel-window, table, th, td {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Navigation Buttons: Login & My Account */
.login-nav-btn,
.my-account-btn {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
    border: 1.5px solid var(--primary) !important;
    background-color: var(--primary) !important;
    border-radius: 9999px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--active-text-color, #ffffff) !important;
    box-shadow: none !important;
}

.login-nav-btn:hover,
.my-account-btn:hover {
    background-color: transparent !important;
    color: var(--primary) !important;
}
