:root {
    --color-saints-gold: #D3A625;
    --color-saints-gold-dim: rgba(211, 166, 37, 0.7);
    --color-saints-black: #121212;
    --color-bg: #0A0A0A;
    --color-surface: rgba(255, 255, 255, 0.05);
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #A0A0A0;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-warning: #FF4D4D;
    --color-success: #4CAF50;
    --font-main: 'Outfit', sans-serif;
    --transition-fast: 0.2s ease-in-out;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: radial-gradient(circle at top right, rgba(211, 166, 37, 0.15) 0%, transparent 40%),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
}

.hidden {
    display: none !important;
}

/* App Container */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #FFF, var(--color-saints-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 12px rgba(211, 166, 37, 0.2);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 4px;
}

/* Phases */
.phase {
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.6s var(--transition-smooth);
}

.phase-header {
    text-align: center;
    margin-bottom: 2rem;
}

.phase-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.phase-header p {
    color: var(--color-text-secondary);
}

/* Grid for Teams/Prospects */
.teams-grid,
.prospects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    align-content: start;
    /* Prevents grid rows from squishing in a fixed-height flex container */
}

/* Cards (Teams & Prospects) */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 125px;
    /* Prevent grid auto-row squash */
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--color-saints-gold-dim);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(211, 166, 37, 0.1);
}

.card:hover::before {
    opacity: 1;
}

.card.saints {
    border-color: var(--color-saints-gold-dim);
    background: linear-gradient(180deg, var(--color-surface) 0%, rgba(211, 166, 37, 0.05) 100%);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 1.2rem;
    /* prevent badge overlap */
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--color-text-primary);
}

.card-subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal-content {
    background: #1A1A1A;
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-saints-gold), transparent);
}

.modal-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
}

.modal-title.warning {
    color: var(--color-warning);
}

.modal-title.success {
    color: var(--color-success);
}

.modal-desc {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.long-text {
    font-size: 1.1rem;
    text-align: left;
}

.long-text ul {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.long-text li {
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.long-text strong {
    color: var(--color-text-primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
}

/* Button */
.btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--color-saints-gold);
    color: var(--color-saints-black);
    box-shadow: 0 4px 15px rgba(211, 166, 37, 0.3);
}

.btn-primary:hover {
    background: #E8B831;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 166, 37, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Draft Room specifics */
.draft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, rgba(211, 166, 37, 0.1) 0%, transparent 100%);
    border: 1px solid var(--color-saints-gold-dim);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.pick-info {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--color-saints-gold);
    letter-spacing: 2px;
}

/* Form Elements */
.custom-select {
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    font-family: var(--font-main);
    font-size: 1rem;
    border-radius: 8px;
    margin-left: 0.5rem;
    outline: none;
}

.custom-select option {
    background: var(--color-bg);
}

/* Secondary Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
    margin-right: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Draft Room Layout */
.draft-room-layout {
    display: flex;
    gap: 2rem;
    height: calc(100vh - 200px);
}

/* Sidebar Draft Tracker */
.draft-tracker {
    width: 300px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.draft-tracker h3 {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-saints-gold);
}

.tracker-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.tracker-item {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    animation: fadeIn 0.3s ease;
}

.tracker-item.saints-pick {
    background: linear-gradient(90deg, rgba(211, 166, 37, 0.15), transparent);
    border-left: 3px solid var(--color-saints-gold);
}

.tracker-pick-info {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.tracker-player {
    font-weight: 600;
}

/* Main Board */
.draft-board {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.draft-board .prospects {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 2rem;
    margin-top: 0;
}

/* Position Filters */
.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
}

.filter-btn.active {
    background: var(--color-saints-gold);
    color: var(--color-saints-black);
    border-color: var(--color-saints-gold);
}

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

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

.scale-in {
    animation: scaleIn 0.4s var(--transition-smooth) forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

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

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .phase-header h2 {
        font-size: 1.5rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

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

    .modal-desc {
        max-height: 50vh;
        overflow-y: auto;
        padding-right: 0.5rem;
    }

    .draft-room-layout {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 150px);
    }

    .draft-tracker {
        width: 100%;
        height: 250px;
        order: -1;
    }

    .draft-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .draft-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
}