@keyframes blink { 50% { opacity: 0.6; } }
.blinking { animation: blink 1s infinite; }

body {
    margin: 0; padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh; display: flex; justify-content: center; align-items: center;
    background: url("../images/d1.jpg") no-repeat center center fixed;
    background-size: cover; position: relative;
}
body::before {
    content: ""; position: absolute; inset: 0;
    background: rgba(0,0,0,0.55); z-index: 0;
}

.top-controls { position: absolute; top: 20px; left: 20px; z-index: 2; }
.home-btn {
    background: rgba(255,255,255,0.45); backdrop-filter: blur(6px);
    color: #000; padding: 10px 18px; border-radius: 8px;
    font-weight: bold; font-size: 15px; text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.home-btn:hover { background: rgba(255,255,255,0.65); }

.card {
    position: relative; z-index: 1; width: 90%; max-width: 820px;
    background: rgba(255,255,255,0.85); backdrop-filter: blur(8px);
    border-radius: 18px; padding: 30px 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    margin-top: 120px; text-align: right;
}

.progress-container {
    width: 100%; height: 18px; background: #ddd;
    border-radius: 10px; margin-bottom: 20px; overflow: hidden;
}
.progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg,#007BFF,#00c6ff);
    transition: width .4s;
}

h2 { margin: 0; font-size: 22px; }
.translation { color: #444; font-style: italic; margin: 8px 0; }
p { font-size: 18px; line-height: 1.9; margin: 10px 0; font-weight: bold; color: #333; }

.audio-btn {
    font-size: 26px; background: #007BFF; color: white;
    border: none; border-radius: 50%; width: 48px; height: 48px;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    margin-right: 10px; transition: transform .2s, background .2s;
}
.audio-btn:hover { transform: scale(1.15); background: #0056b3; }
.audio-btn:active { background: #0069d9; }

.controls { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
button {
    padding: 12px 18px; border: none; border-radius: 10px;
    cursor: pointer; font-size: 16px; font-weight: bold;
    color: #000; opacity: 0.9;
}
button:hover { opacity: 1; }
button#backBtn, button#endBackBtn, button#nextBtn { background: #ffc107; }
button#restartBtn { background: #28a745; color: white; }

.end-screen { text-align: center; display: none; margin-top: 20px; }
.end-controls { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }

@media (min-width: 768px) {
    .controls { flex-direction: row; justify-content: space-between; }
    .end-controls { flex-direction: row; justify-content: center; }
}
