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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.header .subtitle {
    opacity: 0.9;
    font-size: 14px;
    margin-bottom: 15px;
}

.nav-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    transition: background 0.3s;
    font-weight: 600;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Current Month Section */
.current-month-section {
    padding: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.current-month-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
}

.month-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.autocomplete-wrapper {
    position: relative;
}

.form-group input {
    padding: 12px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: border-color 0.3s;
    width: 100%;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    font-size: 14px;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: #f0f0ff;
}

.autocomplete-item .champion-icon-tiny {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    margin-right: 8px;
    vertical-align: middle;
    overflow: hidden;
}

.autocomplete-item .champion-icon-tiny img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* Current Month Display */
.current-month-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 8px;
    color: white;
}

.current-month-display h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.current-challenge-info {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.challenge-detail {
    display: flex;
    gap: 8px;
    align-items: center;
}

.challenge-detail .label {
    opacity: 0.9;
    font-size: 14px;
}

.challenge-detail .value {
    font-weight: 700;
    font-size: 18px;
}

.bosses-display {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.boss-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.boss-label {
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.champion-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 32px;
    overflow: hidden;
}

.champion-icon-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.boss-name {
    font-weight: 600;
    font-size: 16px;
}

.mutators-display {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 8px;
}

.mutators-label {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

.mutators-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mutator-tag {
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

/* Challenges Table Section */
.challenges-section {
    padding: 30px;
}

.challenges-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.challenges-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.challenges-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.challenges-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.challenges-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.challenges-table tbody tr:hover {
    background-color: #f8f9fa;
}

.challenges-table tbody tr.current-month {
    background-color: #fff3cd;
}

.challenges-table tbody tr.current-month:hover {
    background-color: #ffe699;
}

.challenges-table td {
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
}

.challenges-table td.loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.challenge-num {
    font-weight: 700;
    color: #667eea;
}

.difficulty {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.difficulty-1 { background: #d4edda; color: #155724; }
.difficulty-2 { background: #fff3cd; color: #856404; }
.difficulty-3 { background: #f8d7da; color: #721c24; }
.difficulty-4 { background: #e7d4f5; color: #5a1a7a; }
.difficulty-4-5 { background: #d1c4e9; color: #4a148c; }

.champion-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.champion-icon-small {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.champion-icon-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mutators-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mutator-item {
    font-size: 13px;
    color: #555;
}

.mutator-item:before {
    content: "• ";
    color: #667eea;
    font-weight: bold;
}

.empty-cell {
    color: #ccc;
    font-style: italic;
}

/* Roster Match Column */
.roster-matches {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.roster-match-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    border-radius: 6px;
    border-left: 3px solid #667eea;
    transition: transform 0.2s, box-shadow 0.2s;
}

.roster-match-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.roster-match-item .champion-icon-tiny {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
    overflow: hidden;
}

.roster-match-item .champion-icon-tiny img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-champion-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-stars {
    font-size: 11px;
    flex-shrink: 0;
    color: #ffa500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
    }

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

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .bosses-display {
        flex-direction: column;
    }

    .current-challenge-info {
        flex-direction: column;
        gap: 10px;
    }

    .challenges-table {
        font-size: 12px;
    }

    .challenges-table th,
    .challenges-table td {
        padding: 8px;
    }
}
