:root {
    --primary-blue: #4facfe;
    --secondary-blue: #00f2fe;
    --accent-yellow: #f9d423;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #fff;
}

body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.back-button {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    background: var(--glass-bg);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: var(--glass-border);
    transform: translateX(-5px);
}

.score-display {
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--accent-yellow);
    color: #333;
    padding: 8px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.detective-box {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.crystal-ball {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    box-shadow: 0 0 20px var(--primary-blue);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 20px var(--primary-blue); }
    50% { transform: scale(1.05); box-shadow: 0 0 35px var(--secondary-blue); }
    100% { transform: scale(1); box-shadow: 0 0 20px var(--primary-blue); }
}

h1 {
    font-size: 2.5rem;
    margin: 0 0 10px;
    font-weight: 800;
}

.instruction {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.translation-hint {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 25px;
    font-style: italic;
    color: var(--accent-yellow);
}

.sentence-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 600;
}

.word {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.word:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    border-bottom-color: var(--primary-blue);
}

.word.wrong-selection {
    background: #ff4757 !important;
    color: white;
    animation: shake 0.5s;
}

.word.correct-selection {
    background: #2ed573 !important;
    color: white;
    transform: scale(1.1);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.feedback-box {
    margin-top: 20px;
    padding: 20px;
    border-radius: 15px;
    background: rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.feedback-box.hidden {
    display: none;
}

#feedback-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-yellow), #f39c12);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    color: #333;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.6);
}

.progress-bar-container {
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    margin-top: 40px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--primary-blue), var(--secondary-blue));
    transition: width 0.3s ease;
}

.game-footer {
    margin-top: 40px;
    text-align: center;
    opacity: 0.6;
    font-size: 0.9rem;
}
