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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 0;
}

/* Main Container Layout */
.main-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #17408b;
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

/* Content Area */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

h1 {
    color: #1d428a;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-align: center;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

h3 {
    color: #1d428a;
    margin-bottom: 15px;
    font-size: 1.5em;
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.primary-button, .secondary-button {
    background: #c9082a;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.secondary-button {
    background: #17408b;
}

.primary-button:hover {
    background: #a00622;
}

.secondary-button:hover {
    background: #0e2b5c;
}

.score {
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    padding: 10px 20px;
    background: #c9082a;
    border-radius: 25px;
    margin-top: 20px;
    text-align: center;
}

/* Loading Message */
.loading-message {
    font-size: 1.2em;
    color: #666;
    margin: 30px 0;
    text-align: center;
}

/* Error Message */
.error-message {
    color: #c9082a;
    margin: 20px 0;
    padding: 15px;
    background: #ffebee;
    border-radius: 8px;
    font-weight: 500;
    white-space: pre-line;
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
}

/* Mock Badge */
.mock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(201, 8, 42, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    z-index: 10;
}

/* Players Container */
.players-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Player Card */
.player-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.player-card h2 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #1d428a;
}

.image-container {
    width: 100%;
    height: 0;
    padding-bottom: 73.08%; /* Maintains 1040:760 aspect ratio (760/1040 = 0.7308) */
    margin: 0 auto 15px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 10px;
    background: #f0f0f0;
}

.placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #e0e0e0;
    color: #666;
    font-size: 1.2em;
    transition: opacity 0.3s ease;
}

.player-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain to show full image */
    border-radius: 10px;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.player-image.hidden {
    display: none;
}

/* Team Drop Area */
.team-drop-area {
    min-height: 50px;
    margin-top: 15px;
    padding: 10px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.team-drop-area.drag-over {
    background-color: #e3f2fd;
    border-color: #2196f3;
    transform: scale(1.02);
}

.team-drop-area.correct {
    background-color: #e8f5e8;
    border-color: #4caf50;
    color: #2e7d32;
}

.team-drop-area.incorrect {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

/* Quiz Container */
.quiz-container {
    margin-bottom: 20px;
    color: white;
}

.quiz-container h2 {
    color: white;
    font-size: 1.5em;
    margin-bottom: 15px;
    text-align: center;
}

.quiz-instructions {
    margin-bottom: 20px;
    color: #ccc;
    font-style: italic;
    text-align: center;
}

/* Teams Container */
.teams-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
    min-height: 80px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Team Option */
.team-option {
    background: white;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    color: #333;
}

.team-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.team-option.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

/* Team Logo */
.team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: none; /* Hide team logos since they're duplicated */
}

/* Quiz Results */
.quiz-results {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.quiz-results p {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #333;
}

.quiz-results button {
    margin: 0 10px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* FAQ Section */
.faq-section {
    margin-top: 60px;
    text-align: left;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* Accordion Styles */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 15px 20px;
    background: white;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
    transition: background-color 0.3s ease;
    position: relative;
}

.accordion-header:after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5em;
    transition: transform 0.3s ease;
}

.accordion-header.active:after {
    transform: translateY(-50%) rotate(45deg);
}

.accordion-header:hover {
    background-color: #f5f5f5;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f9f9f9;
}

.accordion-content.active {
    max-height: 200px;
}

.accordion-content p {
    padding: 20px;
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* Bottom Controls */
.bottom-controls {
    display: flex;
    justify-content: center;
    margin: 20px 0 40px 0;
}

.bottom-controls button {
    min-width: 150px;
}

/* Animations */
@keyframes revealImage {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes correctDrop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        background-color: #e8f5e8;
    }
    100% {
        transform: scale(1);
    }
}

@keyframes incorrectDrop {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.05) translateX(-5px);
    }
    75% {
        transform: scale(1.05) translateX(5px);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes scoreUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
        color: #4caf50;
    }
    100% {
        transform: scale(1);
    }
}

/* Button disabled state */
.primary-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.primary-button:disabled:hover {
    background: #ccc;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .players-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .players-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content {
        padding: 15px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .primary-button, .secondary-button {
        padding: 10px 20px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .players-container {
        grid-template-columns: 1fr;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .teams-container {
        padding: 15px;
    }
}

/* Add this to the end of the file */
.fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeInOut 0.8s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
} 