body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    color: white;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.game-area {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.camera-section, .game-section {
    flex: 1;
    min-width: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.camera-section h2, .game-section h2 {
    margin-top: 0;
    text-align: center;
}

.video-container {
    position: relative;
    width: 100%;
    height: 360px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

video, canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#gesture-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status {
    text-align: center;
    font-style: italic;
    color: #aaa;
}

.game-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(45deg, #00b09b, #96c93d);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.countdown {
    font-size: 4rem;
    font-weight: bold;
    color: #ff5722;
    text-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
    height: 80px;
}

.results {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.result-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.result-item h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
}

.gesture-display {
    font-size: 5rem;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.gesture-emoji {
    display: block;
}

.result-display {
    text-align: center;
    margin-top: 20px;
}

.result-display h2 {
    font-size: 2rem;
    margin: 0;
    color: #ffeb3b;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.log-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.log-section h2 {
    margin-top: 0;
    text-align: center;
}

#log-container {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
}

.log-entry {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
}

.log-entry:last-child {
    border-bottom: none;
}

.winner {
    color: #4caf50;
    font-weight: bold;
}

.loser {
    color: #f44336;
}

.draw {
    color: #ffeb3b;
}

@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
    }
    
    .results {
        flex-direction: column;
        align-items: center;
    }
    
    .result-item {
        width: 100%;
    }
}
