body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Section Jeu */
.game-section {
    flex: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #2c3e50 0%, #000 100%);
    position: relative;
    border-right: 2px solid #333;
}

#game-container {
    position: relative;
    width: 400px;
    height: 80%;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #444;
    border-radius: 10px;
    overflow: hidden;
}

.lanes-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.lane {
    flex: 1;
    height: 100%;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.lane.pressed {
    background: rgba(255, 255, 255, 0.2) !important;
}

.lane:last-child {
    border-right: none;
}

.hit-zone {
    position: absolute;
    bottom: 50px;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.3);
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 5;
}

/* Couleurs spécifiques par colonne */
#lane-left .hit-zone { border-color: #ff00ff; color: rgba(255, 0, 255, 0.3); }
#lane-down .hit-zone { border-color: #00ffff; color: rgba(0, 255, 255, 0.3); }
#lane-up .hit-zone { border-color: #00ff00; color: rgba(0, 255, 0, 0.3); }
#lane-right .hit-zone { border-color: #ff0000; color: rgba(255, 0, 0, 0.3); }

#notes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.note {
    position: absolute;
    width: 80px; /* 400px / 4 - marge */
    height: 40px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
}

.note-left { background: linear-gradient(to bottom, #ff00ff, #aa00aa); left: 10px; }
.note-down { background: linear-gradient(to bottom, #00ffff, #00aaaa); left: 110px; }
.note-up { background: linear-gradient(to bottom, #00ff00, #00aa00); left: 210px; }
.note-right { background: linear-gradient(to bottom, #ff0000, #aa0000); left: 310px; }

.feedback {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s;
    z-index: 20;
}

.feedback.active {
    opacity: 1;
    animation: pop 0.3s ease-out;
}

@keyframes pop {
    0% { transform: translate(-50%, -50%) scale(0.5); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Infos Jeu */
.game-info {
    margin-top: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.stat {
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 20px;
}

.difficulty-selector {
    display: flex;
    gap: 10px;
}

.difficulty-btn {
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #333;
    color: #fff;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.difficulty-btn[data-level="easy"]:hover, 
.difficulty-btn[data-level="easy"].active {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

.difficulty-btn[data-level="medium"]:hover, 
.difficulty-btn[data-level="medium"].active {
    background: #ffff00;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.4);
}

.difficulty-btn[data-level="hard"]:hover, 
.difficulty-btn[data-level="hard"].active {
    background: #ff0000;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

#start-btn {
    padding: 12px 30px;
    background: #00ffcc;
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    transition: transform 0.2s;
}

#start-btn:hover {
    transform: scale(1.05);
    background: #00e6b8;
}


/* Section Caméra */
.camera-section {
    flex: 1;
    background-color: #111;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.camera-section h3 {
    margin-bottom: 20px;
    color: #00ffcc;
    font-size: 1.5rem;
}

.video-container {
    width: 100%;
    max-width: 640px;
    background: #000;
    border: 2px solid #00ffcc;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

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

.camera-controls {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-camera {
    padding: 12px 30px;
    background: #00ffcc;
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    transition: all 0.3s;
}

.btn-camera:hover {
    transform: scale(1.05);
    background: #00e6b8;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
}

.btn-camera.active {
    background: #ff0000;
}

.btn-camera.active:hover {
    background: #cc0000;
}

.status {
    font-size: 0.9rem;
    color: #999;
    padding: 5px 15px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
}
