body {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

.game-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: auto;
    align-items: flex-start;
}

.game-main {
    flex: 3;
    min-width: 600px;
}

.game-roster {
    flex: 1;
    min-width: 300px;
    background-color: #2c2c2c;
    padding: 1.5rem;
    border-radius: 8px;
}

.roster-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #f59e0b;
    text-align: center;
}

.roster-controls {
    margin-bottom: 1.5rem;
}

#roster-search {
    width: 100%;
    padding: 0.75rem;
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 6px;
    color: #f0f0f0;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.roster-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.roster-filter-btn {
    background: transparent;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.roster-filter-btn:hover {
    background-color: #3a3a3a;
    color: var(--text-primary);
    border-color: #777;
}

.roster-filter-btn.active {
    background-color: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

.daily-challenge-name {
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-blue);
    font-family: var(--font-display);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.guess-grid-container {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.guess-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.guess-slot {
    width: 80px;
    height: 80px;
    perspective: 1000px;
}

.slot-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.guess-slot.flipped .slot-inner {
    transform: rotateY(180deg);
}

.slot-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.slot-front {
    background-color: #2c2c2c;
    border: 2px solid #4a4a4a;
}

.slot-back {
    background-color: #2c2c2c;
    border: 2px solid #4a4a4a;
    transform: rotateY(180deg);
}

.slot-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.slot-back .status-icon {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 1.2rem;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.5);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.roster-hero-card.incorrect-hero {
    opacity: 0.4;
    filter: grayscale(100%);
    cursor: not-allowed;
}

.roster-hero-card.correct-hero {
    border-color: #facc15; /* yellow */
    box-shadow: 0 0 12px #facc15;
}

.roster-hero-card.correct-position {
    border-color: #4ade80; /* green */
    box-shadow: 0 0 12px #4ade80;
}

.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

.roster-hero-card {
    width: 70px;
    height: 70px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.roster-hero-card:hover {
    transform: scale(1.05);
    border-color: #f59e0b;
}

.roster-hero-card.selected {
    border-color: #f59e0b;
    opacity: 0.5;
    transform: scale(0.95);
}

.roster-hero-card.selected::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #f59e0b;
    font-size: 2rem;
    font-weight: bold;
}

.roster-hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* Slot status colors */
.correct-position {
    background-color: #4ade80; /* green */
    border-color: #4ade80;
}

.correct-hero {
    background-color: #facc15; /* yellow */
    border-color: #facc15;
}

.incorrect-hero {
    background-color: #71717a; /* gray */
    border-color: #71717a;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: #333;
    color: #fff;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateX(100%);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: #2c2c2c;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    position: relative;
    border: 1px solid #4a4a4a;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #f0f0f0;
    font-size: 2rem;
    cursor: pointer;
}

.modal-content h2 {
    font-family: 'Bebas Neue', sans-serif;
    color: #f59e0b;
    margin-top: 0;
}

.modal-content h3 {
    color: var(--accent-blue);
    margin-top: 1.5rem;
    border-bottom: 1px solid #4a4a4a;
    padding-bottom: 0.5rem;
}

.modal-content ul, .modal-content ol {
    padding-left: 20px;
}

.modal-content li {
    margin-bottom: 0.75rem;
}

.color-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
}
.color-box.green { background-color: #4ade80; }
.color-box.yellow { background-color: #facc15; }
.color-box.gray { background-color: #71717a; }
