body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000000;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #000000;
    overflow: hidden;
}

#content {background-color:#000000; padding:40px;}


.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #000000;
    background: #ffffff;
}

.zone {
    margin: 0;
    overflow: hidden;
    border: 1px solid #000000;
}

.zone-header {
    background: #000000;
    color: #ffffff;
    text-align: center;
    padding: 20px;
    margin-bottom: 0;
    border-bottom: 1px solid #000000;
}

.zone-header h2 {
    margin: 0;
    font-size: 1.8em;
}

.zone-header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
}

.logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Main Header Styles */
.main-header {
    background: #000000;
    color: #ffffff;
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #000000;
}

.main-header h2 {
    margin: 15px 0;
    font-size: 1.8em;
    font-weight: 600;
}

/* Gameweek Accordion Styles */
.gameweeks-container {
    max-width: 1400px;
    margin: 0 auto;
}

.gameweek-accordion {
    margin-bottom: 20px;
    border: 1px solid #000000;
    background: #ffffff;
}

.gameweek-header {
    background: #000000;
    color: #ffffff;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.gameweek-header:hover {
    background: #333333;
}

.gameweek-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gameweek-title-row h2 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
}

.expand-icon {
    font-size: 1.2em;
    transition: transform 0.2s;
}

.gameweek-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.gameweek-content.expanded {
    max-height: 2000px;
}

.gameweek-content.collapsed {
    max-height: 0;
}

.placeholder-content {
    padding: 40px 20px;
    text-align: center;
    color: #666666;
    background: #f9f9f9;
}

.placeholder-content p {
    margin: 10px 0;
    font-size: 1.1em;
}

.refresh-button {
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 10px;
    font-weight: 500;
    transition: all 0.2s;
}

.refresh-button:hover {
    background: #ffffff;
    color: #000000;
}

.refresh-button:disabled {
    background: #f5f5f5;
    color: #999999;
    cursor: not-allowed;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
}

th, td {
    padding: 16px 12px;
    text-align: center;
    border: 1px solid #000000;
    font-size: 0.7em;
    font-weight: 500;
    word-wrap: break-word;
}

th {
    background: #000000;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rank-column {
    width: 8%;
}

.team-column {
    width: 20%;
}

.week1-actual-column {
    width: 9%;
}

.week1-projected-column {
    width: 9%;
}

.week2-actual-column {
    width: 9%;
}

.week2-projected-column {
    width: 9%;
}

.total-actual-column {
    width: 9%;
}

.total-projected-column {
    width: 9%;
}

.chop-column {
    width: 8%;
}

th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

tr:hover {
    background: #f8f9fa;
}

.team-name {
    font-weight: bold;
    color: #2c3e50;
}

.team-display-name {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1em;
}

.user-display-name {
    font-weight: normal;
    color: #7f8c8d;
    font-size: 0.85em;
    margin-top: 2px;
}

.score {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.week1-score {
    color: #000000;
    font-size: 1.1em;
}

.week2-score {
    color: #000000;
    font-size: 1.1em;
}

.total-score {
    color: #2c3e50;
    font-size: 1.1em;
}

.chop-probability {
    color: #000000;
    font-weight: bold;
    font-size: 1.1em;
}

.rank {
    background: #ecf0f1;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #2c3e50;
}

.zone-indicator {
    font-size: 0.7em;
    margin-top: 2px;
    font-weight: bold;
}

.played-count {
    font-size: 0.7em;
    color: #666;
    margin-top: 2px;
    font-weight: normal;
}

.chop-zone-row {
    background: #ffffff;
    color: #000000;
    border: 3px solid #ff0000;
}

.chop-zone-row .zone-indicator {
    color: #ff0000;
    background: #ffffff;
    font-weight: bold;
}

.danger-zone-row {
    background: #ffffff;
    color: #000000;
    border: 3px solid #ffaa00;
}

.danger-zone-row .zone-indicator {
    color: #ffaa00;
    background: #ffffff;
    font-weight: bold;
}

.safe-zone-row {
    background: #ffffff;
    color: #000000;
}

.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable:hover {
    background: #f5f5f5;
}

.chop-zone-row .sortable:hover {
    background: #fff5f5;
    color: #000000;
}

.danger-zone-row .sortable:hover {
    background: #fffbf0;
    color: #000000;
}

.safe-zone-row .sortable:hover {
    background: #f5f5f5;
    color: #000000;
}

.sortable::after {
    content: ' ↕️';
    opacity: 0.5;
    font-size: 0.8em;
}

.sortable.asc::after {
    content: ' ↑';
    opacity: 1;
}

.sortable.desc::after {
    content: ' ↓';
    opacity: 1;
}

.error {
    background: #ff4757;
    color: white;
    padding: 20px;
    text-align: center;
    font-weight: bold;
}

.last-updated {
    text-align: center;
    padding: 16px;
    color: #000000;
    font-size: 0.9em;
    background: #ffffff;
    border-top: 1px solid #000000;
    font-weight: 500;
}

.no-data-message {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
    font-size: 1.1em;
    font-style: italic;
    background: #f9f9f9;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        margin: 0;
        border-radius: 8px;
    }
    
    #content {
        padding: 20px 15px;
    }
    
    .zone {
        margin: 0;
    }
    
    .zone-header {
        padding: 15px 10px;
    }
    
    .zone-header h2 {
        font-size: 1.4em;
    }
    
    .gameweek-header {
        padding: 12px 15px;
    }
    
    .gameweek-title-row h2 {
        font-size: 1.2em;
    }
    
    .main-header {
        padding: 15px 10px;
        margin-bottom: 15px;
    }
    
    .main-header h2 {
        font-size: 1.4em;
    }
    
    /* Table mobile optimizations */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #000000;
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    table {
        font-size: 0.65em;
        table-layout: fixed;
        min-width: 600px;
    }
    
    th, td {
        padding: 6px 3px;
        font-size: 0.65em;
        line-height: 1.2;
    }
    
    th {
        font-size: 0.6em;
        letter-spacing: 0.3px;
    }
    
    /* Column width adjustments for mobile */
    .rank-column { width: 8%; }
    .team-column { width: 28%; }
    .week1-actual-column { width: 8%; }
    .week1-projected-column { width: 8%; }
    .week2-actual-column { width: 8%; }
    .week2-projected-column { width: 8%; }
    .total-actual-column { width: 8%; }
    .total-projected-column { width: 8%; }
    .chop-column { width: 8%; }
    
    /* Team name styling for mobile */
    .team-display-name {
        font-size: 0.8em;
        line-height: 1.1;
    }
    
    .user-display-name {
        font-size: 0.7em;
        margin-top: 1px;
    }
    
    /* Score styling for mobile */
    .score {
        font-size: 0.9em;
    }
    
    .week1-score, .week2-score, .total-score {
        font-size: 0.9em;
    }
    
    .chop-probability {
        font-size: 0.9em;
    }
    
    /* Rank circle adjustments */
    .rank {
        width: 24px;
        height: 24px;
        font-size: 0.7em;
    }
    
    /* Played count and zone indicator */
    .played-count {
        font-size: 0.6em;
    }
    
    .zone-indicator {
        font-size: 0.6em;
    }
    
    /* Button adjustments */
    .refresh-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    /* Last updated styling */
    .last-updated {
        padding: 12px;
        font-size: 0.8em;
    }
    
    /* Placeholder content */
    .placeholder-content {
        padding: 30px 15px;
    }
    
    .placeholder-content p {
        font-size: 1em;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    #content {
        padding: 15px 10px;
    }
    
    .zone-header {
        padding: 12px 8px;
    }
    
    .zone-header h2 {
        font-size: 1.2em;
    }
    
    .gameweek-header {
        padding: 10px 12px;
    }
    
    .gameweek-title-row h2 {
        font-size: 1.1em;
    }
    
    /* Even smaller table text */
    .table-container {
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    table {
        font-size: 0.6em;
        min-width: 550px;
    }
    
    th, td {
        padding: 4px 2px;
        font-size: 0.6em;
    }
    
    th {
        font-size: 0.55em;
    }
    
    /* Further column adjustments */
    .rank-column { width: 7%; }
    .team-column { width: 30%; }
    .week1-actual-column { width: 7.5%; }
    .week1-projected-column { width: 7.5%; }
    .week2-actual-column { width: 7.5%; }
    .week2-projected-column { width: 7.5%; }
    .total-actual-column { width: 7.5%; }
    .total-projected-column { width: 7.5%; }
    .chop-column { width: 7.5%; }
    
    /* Smaller team names */
    .team-display-name {
        font-size: 0.75em;
    }
    
    .user-display-name {
        font-size: 0.65em;
    }
    
    /* Smaller scores */
    .score {
        font-size: 0.8em;
    }
    
    .week1-score, .week2-score, .total-score {
        font-size: 0.8em;
    }
    
    .chop-probability {
        font-size: 0.8em;
    }
    
    /* Smaller rank circles */
    .rank {
        width: 20px;
        height: 20px;
        font-size: 0.65em;
    }
    
    /* Even smaller indicators */
    .played-count {
        font-size: 0.55em;
    }
    
    .zone-indicator {
        font-size: 0.55em;
    }
    
    /* Smaller buttons */
    .refresh-button {
        padding: 8px 16px;
        font-size: 0.85em;
    }
    
    .last-updated {
        padding: 10px;
        font-size: 0.75em;
    }
}
