/* Expression Good Vibrations Game Styles */

/* Game Container */
.egv-game-container {
    position: relative;
    background-color: #222;
    color: #fff;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    max-width: 1200px;
    margin: 0 auto;
}

/* Common Screen Styles */
.egv-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.egv-screen.active {
    display: flex;
}

/* Menu Screen */
.egv-menu-screen {
    background-color: #0066aa;
}

.egv-title {
    font-size: 36px;
    font-weight: bold;
    margin: 40px 0 30px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.egv-difficulty-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 300px;
    margin-bottom: 30px;
}

.egv-difficulty-button {
    width: 100%;
    margin: 8px 0;
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.egv-difficulty-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.egv-difficulty-button.selected {
    background-color: #ffff00;
    color: #000;
    border-color: #ffff00;
    font-weight: bold;
}

.egv-expert-note {
    color: #ffff00;
    font-size: 14px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.egv-start-button {
    width: 300px;
    padding: 15px 0;
    margin: 20px 0;
    background-color: #00cc66;
    color: black;
    border: none;
    border-radius: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.egv-start-button:hover {
    background-color: #00ee66;
    transform: scale(1.05);
}

.egv-high-score {
    font-size: 18px;
    margin: 15px 0;
}

.egv-instructions {
    font-size: 16px;
    margin: 15px 0;
    max-width: 600px;
}

.egv-expert-instructions {
    display: none;
    font-size: 16px;
    margin: 15px 0;
    max-width: 600px;
    color: #ffff00;
}

/* Game Playing Screen */
.egv-game-screen {
    background-color: #000;
}

.egv-game-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 10px 0;
    margin-bottom: 10px;
}

.egv-round, .egv-score, .egv-time {
    font-size: 20px;
}

.egv-time {
    color: #ff6666;
}

.egv-progress-bar-container {
    width: calc(100% - 40px);
    height: 20px;
    background-color: #666;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.egv-progress-bar {
    height: 100%;
    width: 100%;
    background-color: #888;
    transition: width 0.1s linear;
}

.egv-memorize-message {
    display: none;
    font-size: 24px;
    font-weight: bold;
    color: #ffff00;
    margin: 10px 0;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.egv-difficulty-indicator {
    position: absolute;
    top: 60px;
    left: 20px;
    font-size: 16px;
}

.egv-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    height: 400px;
    margin: 20px 0;
}

.egv-grid-item {
    position: relative;
    background-color: #444;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.egv-grid-item:hover {
    transform: scale(1.02);
}

.egv-grid-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.egv-grid-item.hidden .egv-grid-image {
    display: none;
}

.egv-grid-item.hidden {
    background-color: #335588;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid #4477aa;
}

.egv-grid-item.hidden::after {
    content: "?";
    font-size: 48px;
    color: #aaccee;
}

.egv-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background-color 0.2s ease;
}

.egv-grid-item.selected-positive .egv-grid-overlay {
    background-color: rgba(0, 255, 0, 0.4);
    border: 3px solid #00cc00;
}

.egv-grid-item.selected-negative .egv-grid-overlay {
    background-color: rgba(255, 0, 0, 0.4);
    border: 3px solid #cc0000;
}

.egv-hint {
    font-size: 16px;
    margin: 20px 0;
}

.egv-expert-status {
    display: none;
    width: 100%;
    margin-top: 20px;
}

.egv-level-info, .egv-find-info, .egv-found-info {
    font-size: 16px;
    margin: 5px 0;
}

.egv-find-info {
    color: #66ff66;
}

/* Round Complete Screen */
.egv-round-complete-screen {
    background-color: #0066aa;
}

.egv-complete-header {
    font-size: 36px;
    font-weight: bold;
    margin: 40px 0 30px;
    color: white;
}

.egv-current-score {
    font-size: 24px;
    margin: 10px 0;
}

.egv-recognition-time {
    font-size: 20px;
    margin: 10px 0 20px;
}

.egv-encouragement-message {
    font-size: 18px;
    margin: 15px 0;
    color: #66ff66;
    max-width: 600px;
}

.egv-new-high-score {
    display: none;
    font-size: 24px;
    margin: 15px 0;
    color: #ffff00;
    font-weight: bold;
    animation: pulse 1s infinite;
}

.egv-expert-progress {
    display: none;
    font-size: 18px;
    margin: 15px 0;
    color: #ffff00;
}

.egv-next-level-message {
    display: none;
    font-size: 18px;
    margin: 10px 0;
    color: #66ff66;
}

.egv-continue-button, .egv-menu-button, .egv-retry-button, .egv-game-over-menu-button, .egv-win-menu-button {
    width: 300px;
    padding: 15px 0;
    margin: 15px 0;
    background-color: #00cc66;
    color: black;
    border: none;
    border-radius: 15px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.egv-menu-button, .egv-game-over-menu-button, .egv-win-menu-button {
    background-color: #ffcc00;
}

.egv-continue-button:hover, .egv-menu-button:hover, .egv-retry-button:hover, .egv-game-over-menu-button:hover, .egv-win-menu-button:hover {
    transform: scale(1.05);
}

.egv-final-results {
    display: none;
    margin-top: 20px;
}

.egv-final-header {
    font-size: 24px;
    margin: 10px 0;
}

.egv-final-difficulty, .egv-final-high-score {
    font-size: 18px;
    margin: 5px 0;
}

/* Game Over Screen */
.egv-game-over-screen {
    background-color: #aa0000;
}

.egv-game-over-header {
    font-size: 36px;
    font-weight: bold;
    margin: 40px 0 30px;
    color: white;
}

.egv-game-over-score {
    font-size: 24px;
    margin: 20px 0;
}

.egv-game-over-info {
    font-size: 18px;
    margin: 30px 0;
    max-width: 600px;
}

.egv-retry-button {
    margin-top: 30px;
}

/* Win Screen */
.egv-win-screen {
    background-color: #006600;
}

.egv-win-header {
    font-size: 36px;
    font-weight: bold;
    margin: 40px 0 20px;
    color: #ffff00;
}

.egv-win-message {
    font-size: 24px;
    margin: 10px 0;
    color: white;
}

.egv-win-score, .egv-win-high-score {
    font-size: 20px;
    margin: 10px 0;
}

.egv-special-message {
    font-size: 22px;
    margin: 30px 0;
    color: #66ff66;
    font-weight: bold;
}

/* Loading Overlay */
.egv-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.egv-loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.egv-loading-text {
    font-size: 18px;
    color: white;
}

/* Recognition Time Display */
.egv-recognition-time-display {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 0, 0.7);
    color: black;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .egv-title {
        font-size: 28px;
        margin: 20px 0;
    }
    
    .egv-grid-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    
    .egv-difficulty-buttons, .egv-start-button, 
    .egv-continue-button, .egv-menu-button, 
    .egv-retry-button, .egv-game-over-menu-button, 
    .egv-win-menu-button {
        width: 100%;
        max-width: 300px;
    }
    
    .egv-game-header {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
}

/* Admin Styles */
.egv-admin-style {
    display: none;
}
