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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.container {
    text-align: center;
    padding: 20px;
    max-width: 600px;
    width: 100%;
}

h1 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.screen {
    animation: fadeIn 0.3s ease;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Start Screen */
.instructions {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    line-height: 2;
}

.key {
    display: inline-block;
    background: #e94560;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: bold;
    margin: 0 5px;
    min-width: 40px;
}

button {
    background: #e94560;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

button:hover {
    background: #ff6b6b;
    transform: scale(1.05);
}

/* Game Screen */
.progress {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #aaa;
}

.image-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 30px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#current-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    object-fit: contain;
}

.controls {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.rating-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
}

.rating-btn.good {
    background: #4ecca3;
}

.rating-btn.good:hover {
    background: #6ee7b7;
}

.rating-btn.bad {
    background: #e94560;
}

.rating-btn.bad:hover {
    background: #ff6b6b;
}

.rating-btn .key {
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 10px;
    margin: 0;
}

/* Result Screen */
h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 30px;
}

.stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px 50px;
    border-radius: 15px;
}

.stat.good {
    border: 3px solid #4ecca3;
}

.stat.bad {
    border: 3px solid #e94560;
}

.stat-value {
    display: block;
    font-size: 3rem;
    font-weight: bold;
}

.stat-label {
    font-size: 1.2rem;
    color: #aaa;
}

/* Loading Animation */
.loading {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #e94560;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 500px) {
    .controls {
        flex-direction: column;
    }

    .stats {
        flex-direction: column;
        gap: 20px;
    }
}
