/* ============================================
   DRAFT ROOM STYLES
   LBL Fantasy - Snake Draft Mode
   ============================================ */

:root {
    --draft-primary: #F37021;
    /* Basketball Orange */
    --draft-primary-light: #ff8c00;
    --draft-secondary: #ffffff;
    /* White for secondary pop */
    --draft-warning: #fbbf24;
    --draft-danger: #ef4444;
    --card-bg: rgba(30, 30, 30, 0.95);
    /* Consistent with other pages */
    --card-border: rgba(243, 112, 33, 0.2);
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.draft-main {
    padding-top: 80px;
    min-height: 100vh;
    background: linear-gradient(135deg, #020202 0%, #0a0a15 50%, #020202 100%);
}

/* ============================================
   LEAGUES SECTION
   ============================================ */

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

.leagues-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.leagues-section h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 2px 2px 0px var(--draft-primary);
    background: none;
    -webkit-text-fill-color: initial;
    margin-bottom: 0.5rem;
}

.leagues-section .subtitle {
    font-family: 'Oswald', sans-serif;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 300;
}

.league-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.action-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
}

.action-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--draft-primary);
    text-transform: uppercase;
}

.action-card form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-card input,
.action-card select {
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

.action-card select option {
    background: #1a1a2e;
}

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

.my-leagues h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #fff;
    text-transform: uppercase;
}

.leagues-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.league-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.league-card:hover {
    border-color: var(--draft-primary);
    transform: translateY(-2px);
}

.league-card .league-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.league-card .league-meta {
    display: flex;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.league-card .status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.75rem;
}

.status-badge.pending {
    background: rgba(251, 191, 36, 0.2);
    color: var(--draft-warning);
}

.status-badge.in_progress {
    background: rgba(0, 212, 170, 0.2);
    color: var(--draft-secondary);
}

.status-badge.completed {
    background: rgba(249, 115, 22, 0.2);
    color: var(--draft-primary);
}

.empty-leagues {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   DRAFT ROOM SECTION
   ============================================ */

.draft-room-section {
    padding: 1rem 2rem 3rem;
}

.draft-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.draft-title h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.draft-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(251, 191, 36, 0.2);
    color: var(--draft-warning);
}

.draft-status-badge.live {
    background: rgba(0, 212, 170, 0.2);
    color: var(--draft-secondary);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.draft-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(249, 115, 22, 0.1);
    border: 2px solid var(--draft-primary);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
}

.timer-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.timer-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--draft-primary);
}

.timer-value.warning {
    color: var(--draft-warning);
}

.timer-value.danger {
    color: var(--draft-danger);
    animation: blink 0.5s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Draft Info Bar */
.draft-info-bar {
    display: flex;
    gap: 2rem;
    padding: 1rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.info-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.current-picker .info-value {
    color: var(--draft-secondary);
}

.your-turn {
    margin-left: auto;
}

.your-turn-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--draft-warning);
    animation: pulse 1s infinite;
    text-transform: uppercase;
}

/* Up Next Indicator */
.up-next .info-value {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Live Pick Ticker */
.live-ticker {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, rgba(243, 112, 33, 0.15) 0%, rgba(30, 30, 30, 0.95) 100%);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--draft-primary);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.ticker-label {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--draft-primary);
    text-transform: uppercase;
    white-space: nowrap;
    font-weight: 600;
}

.ticker-items {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ticker-items::-webkit-scrollbar {
    display: none;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.85rem;
}

.ticker-item .player-name {
    color: #fff;
    font-weight: 600;
}

.ticker-item .owner-name {
    color: rgba(255, 255, 255, 0.5);
}

.ticker-item.auto-pick {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid var(--draft-warning);
}

.ticker-item.auto-pick::before {
    content: '🤖';
    margin-right: 0.25rem;
}

.ticker-placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* Mobile Responsive Ticker */
@media (max-width: 768px) {
    .live-ticker {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .ticker-items {
        width: 100%;
    }
    
    .draft-info-bar {
        gap: 1rem;
    }
    
    .info-value {
        font-size: 1.2rem;
    }
}

/* Draft Layout */
.draft-layout {
    display: grid;
    grid-template-columns: 200px 1fr 280px;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 1100px) {
    .draft-layout {
        grid-template-columns: 1fr 1fr;
    }

    .draft-order-panel {
        grid-column: span 2;
    }
}

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

    .draft-order-panel {
        grid-column: span 1;
    }
}

/* Panels */
.draft-order-panel,
.available-players-panel,
.draft-board-panel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem;
}

.draft-order-panel h3,
.available-players-panel h3,
.draft-board-panel h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #fff;
    text-transform: uppercase;
}

/* Draft Order */
.draft-order-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid transparent;
}

.order-item.current {
    background: rgba(0, 212, 170, 0.1);
    border-color: var(--draft-secondary);
}

.order-item.you {
    background: rgba(249, 115, 22, 0.1);
    border-color: var(--draft-primary);
}

.order-position {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    width: 25px;
    font-weight: 600;
}

.order-name {
    font-size: 0.9rem;
    color: #fff;
}

.owner-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}

.invite-code-display {
    margin-top: 1rem;
    text-align: center;
}

.invite-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    display: block;
}

.invite-code {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--draft-primary);
    letter-spacing: 2px;
}

/* Available Players */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-filter {
    display: flex;
    gap: 0.5rem;
}

.search-filter input,
.search-filter select {
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
}

.search-filter select option {
    background: #1a1a2e;
}

.players-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-item:hover {
    background: rgba(249, 115, 22, 0.1);
    border-color: var(--draft-primary);
}

.player-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.player-item .player-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #333, #555);
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    overflow: hidden;
}

.player-item .player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-item .player-info {
    flex: 1;
}

.player-item .player-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}

.player-item .player-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.player-item .player-stats {
    font-size: 0.7rem;
    color: var(--draft-secondary);
}

/* Draft History */
.draft-history {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.pick-number {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    min-width: 25px;
    font-weight: 600;
}

.history-item .player-info {
    flex: 1;
}

.history-item .player-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
}

.history-item .picked-by {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

/* My Roster */
.my-roster-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem;
}

.my-roster-section h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #fff;
    text-transform: uppercase;
}

.my-roster-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.roster-slot {
    flex: 0 0 120px;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--card-border);
    border-radius: 10px;
}

.roster-slot.filled {
    border-style: solid;
    border-color: var(--draft-primary);
    background: rgba(249, 115, 22, 0.1);
}

.roster-slot .slot-number {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--draft-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.roster-slot .slot-player {
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
}

.roster-slot .slot-meta {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Auth Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.auth-modal {
    background: #1a1a2e;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    padding: 2rem;
    border: 1px solid var(--card-border);
}

.modal-close {
    float: right;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    gap: 1rem;
    clear: both;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.auth-tab.active {
    color: var(--draft-primary);
    border-bottom-color: var(--draft-primary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form input {
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

/* ============================================
   TRADE CENTER STYLES
   ============================================ */

.trade-modal {
    background: #15151e;
    border: 1px solid var(--card-border);
    max-width: 800px;
    width: 90%;
    color: #fff;
}

.trade-modal h2 {
    font-family: var(--font-display);
    color: var(--draft-primary);
    margin-bottom: 2rem;
    font-size: 2rem;
    text-transform: uppercase;
    text-align: center;
}

.trade-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trade-tab {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-display);
    font-size: 1.2rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    text-transform: uppercase;
}

.trade-tab.active {
    color: var(--draft-primary);
    border-bottom-color: var(--draft-primary);
}

.trade-list-section {
    margin-bottom: 2rem;
}

.trade-list-section h4 {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.trade-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.trade-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.trade-status {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.trade-status.pending {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.trade-status.accepted {
    background: rgba(0, 212, 170, 0.2);
    color: #00d4aa;
}

.trade-status.rejected,
.trade-status.cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.trade-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.trade-party {
    flex: 1;
    text-align: center;
}

.trade-party strong {
    display: block;
    color: var(--draft-primary);
    margin-bottom: 0.5rem;
}

.trade-icon {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.player-chip {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
}

.trade-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Proposal Steps */
.trade-swap-ui {
    display: grid;
    grid-template-columns: 1fr 50px 1fr;
    gap: 1rem;
    align-items: center;
    margin: 2rem 0;
}

.trade-side h4 {
    text-align: center;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.trade-divider {
    text-align: center;
    font-size: 2rem;
    color: var(--draft-primary);
}

.trade-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}