/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-container {
    width: 90%;
    max-width: 1200px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Game Header */
.game-header {
    background-color: #4a148c;
    color: white;
    padding: 15px;
    text-align: center;
}

.game-header h1 {
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.score-panel {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    font-size: 1.2rem;
    margin-top: 10px;
}

/* Game Area */
.game-area {
    position: relative;
    width: 100%;
    height: 70vh;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: center;
    padding: 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
}

button {
    background-color: #4a148c;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #7b1fa2;
}

button:disabled {
    background-color: #9e9e9e;
    cursor: not-allowed;
}

/* Quiz Panel */
.quiz-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 500px;
    z-index: 10;
}

.quiz-panel h3 {
    color: #4a148c;
    margin-bottom: 15px;
    text-align: center;
}

#quiz-question {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

#quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.quiz-option {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.quiz-option:hover {
    background-color: #f0f0f0;
}

.quiz-option.selected {
    background-color: #e1bee7;
    border-color: #8e24aa;
}

/* Modal Styles */
.modal {
    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: 100;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.guide-content {
    margin-top: 20px;
}

.guide-content h3 {
    color: #4a148c;
    margin: 15px 0 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .game-header h1 {
        font-size: 2rem;
    }
    
    .score-panel {
        font-size: 1rem;
        flex-direction: column;
        gap: 5px;
    }
    
    .game-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    button {
        margin: 5px;
    }
}

/* Game Entity Styles */
.tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    z-index: 20;
    pointer-events: none;
}

/* Affix Types Visual Indicators */
.prefix-indicator {
    border: 3px solid #2196F3; /* Blue */
}

.derivational-suffix-indicator {
    border: 3px solid #9C27B0; /* Purple */
}

.inflectional-indicator {
    border: 3px solid #FF9800; /* Orange */
}

/* Compatibility Indicators */
.compatible {
    background-color: rgba(76, 175, 80, 0.3); /* Green */
}

.incompatible {
    background-color: rgba(244, 67, 54, 0.3); /* Red */
}
