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

body {
    font-family: Arial, sans-serif;
    overflow: hidden;
    background: #000;
}

#menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
}

.menu-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.language-selection {
    margin-bottom: 2rem;
    text-align: center;
}

.language-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.lang-btn {
    padding: 0.5rem 1.5rem;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.lang-btn.active {
    background: rgba(255,255,255,0.3);
    border-color: white;
    transform: scale(1.05);
}

.color-selection {
    margin-bottom: 2rem;
    text-align: center;
}

.color-selection h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    opacity: 0.9;
}

.color-tiles {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.color-tile {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.color-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.color-tile.selected {
    border-color: white;
    transform: scale(1.1);
}

.color-tile.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.color-name {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    pointer-events: none;
}

.checkmark {
    position: absolute;
    top: 5px;
    right: 5px;
    background: white;
    color: #333;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.color-tile.selected .checkmark {
    display: flex;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 250px;
}

.menu-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.menu-btn:disabled {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.3);
    cursor: not-allowed;
    transform: none;
}

.menu-btn:disabled:hover {
    background: rgba(255,255,255,0.05);
    transform: none;
}

.test-btn {
    background: rgba(255,165,0,0.2) !important;
    border-color: rgba(255,165,0,0.5) !important;
    font-size: 1rem !important;
    padding: 0.8rem 1.5rem !important;
}

.test-btn:hover {
    background: rgba(255,165,0,0.3) !important;
    border-color: rgba(255,165,0,0.7) !important;
}

#game {
    display: none;
    height: 100vh;
    position: relative;
}

#colorCanvas {
    width: 100%;
    height: 100%;
    transition: background-color 0.3s;
}

.game-info {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    background: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 8px;
}

.controls-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    background: rgba(0,0,0,0.7);
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
}

.hidden {
    display: none !important;
}
