:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #a855f7;
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #22c55e;
    --danger: #ef4444;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

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

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: white;
    outline: none;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.input-group select option {
    background: #1e293b;
    color: white;
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

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

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

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Select2 Dark Mode Customization */
.select2-container .select2-selection--single {
    background-color: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 0.75rem !important;
    height: 3rem !important;
    display: flex !important;
    align-items: center !important;
    color: white !important;
    background-image: none !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    color: white !important;
    line-height: 3rem !important;
    padding-left: 1rem !important;
}

.select2-container .select2-selection--single .select2-selection__arrow {
    height: 2.8rem !important;
    border-left: 1px solid var(--glass-border) !important;
    background: transparent !important;
}

.select2-dropdown {
    background-color: #1e293b !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
    border-radius: 4px !important;
}

.select2-results__option {
    padding: 0.75rem 1rem !important;
    background-color: transparent !important;
    color: var(--text-muted) !important;
}

.select2-results__option--highlighted[aria-selected],
.select2-results__option[aria-selected="true"] {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: white !important;
}

/* Quick Bid Buttons */
.quick-bid-btn {
    transition: all 0.2s ease-in-out !important;
}

.quick-bid-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--primary) !important;
    transform: scale(1.02);
}

.quick-bid-btn:active {
    transform: scale(0.98);
}

/* Projector View Styles - New 2-row layout */
.projector-layout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: calc(100vh - 1rem);
    min-height: 500px;
    padding: 0.5rem;
    max-width: 1800px;
    margin: 0 auto;
    overflow: hidden;
}

/* Top row: teams strip */
.projector-teams-strip {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.6rem 0.75rem;
    flex-shrink: 0;
}

.projector-teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
}

.projector-team-chip {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.projector-team-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.projector-team-chip .chip-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.projector-team-chip .chip-purse {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--success);
}

/* Bottom row: player card + bid history */
.projector-bottom {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
}

.projector-player-card {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent), var(--glass-bg);
    border: 1px solid var(--primary);
    border-radius: 1rem;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.projector-player-img-wrapper {
    width: 300px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 2px solid var(--primary);
    flex-shrink: 0;
}

.projector-player-info {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.projector-bid-giant {
    font-size: clamp(3rem, 10vh, 6rem);
    font-weight: 900;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    margin: 0.5rem 0;
    color: white;
    line-height: 1;
}

.projector-recent-bids {
    font-size: 0.95rem;
}

/* Layout Themes - Arrangement Controls */

/* Layout 1: Panoramic (Teams Top, Split Body) */
.projector-layout[data-theme="layout1"] {
    flex-direction: column;
}

.projector-layout[data-theme="layout1"] .projector-bottom {
    grid-template-columns: 1.2fr 1fr;
    max-height: calc(100vh - 120px);
}

/* Layout 2: Cinema Focus (Teams Bottom, Hero Image) */
.projector-layout[data-theme="layout2"] {
    flex-direction: column-reverse;
}

.projector-layout[data-theme="layout2"] .projector-bottom {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
}

.projector-layout[data-theme="layout2"] .projector-player-card {
    flex-direction: column;
    text-align: center;
}

.projector-layout[data-theme="layout2"] .projector-player-img-wrapper {
    width: 100%;
    height: 45vh;
    border-right: none;
    border-bottom: 2px solid var(--primary);
}

.projector-layout[data-theme="layout2"] #bids-history-container {
    display: none;
    /* Hide history to focus on visual impact */
}

/* Layout 3: Pro Sidebar (Teams Sidebar, Content Main) */
.projector-layout[data-theme="layout3"] {
    flex-direction: row;
    padding: 1rem;
}

.projector-layout[data-theme="layout3"] .projector-teams-strip {
    width: 250px;
    height: 100%;
    flex-direction: column;
}

.projector-layout[data-theme="layout3"] .projector-teams-grid {
    grid-template-columns: 1fr;
}

.projector-layout[data-theme="layout3"] .projector-bottom {
    grid-template-columns: 1fr;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .projector-layout {
        height: auto !important;
        overflow: visible !important;
    }

    .projector-bottom {
        grid-template-columns: 1fr !important;
    }

    .auction-layout {
        grid-template-columns: 1fr !important;
        height: auto !important;
        overflow: visible !important;
    }

    .glass-card {
        padding: 1rem;
    }

    .projector-bid-giant {
        font-size: 4rem;
    }
}

@media (max-width: 600px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.8rem;
    }

    #current-bid-display {
        font-size: 2.5rem;
    }
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem 5%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-muted);
}

footer p {
    font-size: 0.9rem;
    line-height: 1.6;
}

footer a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Landing Page Specific Styles */
.hero-section {
    position: relative;
    padding: 100px 5%;
    text-align: center;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9)), url('../images/hero_bg.png');
    background-size: cover;
    background-position: center;
    border-radius: 2rem;
    margin-bottom: 4rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 6rem;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: left;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.section-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    border-radius: 2rem;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin: 4rem 0;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.how-it-works {
    padding: 4rem 0;
    position: relative;
}

.step-card {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: center;
}

.step-number {
    font-size: 4rem;
    font-weight: 900;
    color: rgba(99, 102, 241, 0.1);
    line-height: 1;
}

.step-content {
    flex: 1;
}

@media (max-width: 600px) {
    .step-card {
        flex-direction: column;
        text-align: center;
    }
}