@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700&family=Inter:wght@400;500;600&display=swap');

:root {
    --ds-primary: #f26b52;
    --ds-secondary: #0a4f57;
    --ds-premium-green: #25D366;
    --ds-bg: #fdfbf7;
    --ds-card-bg: #ffffff;
    --ds-border: #efece6;
    --ds-radius: 12px;
}

.ds-wrapper {
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    padding: 60px 20px 20px 20px;
    background-color: transparent;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

/* SOUND & FULLSCREEN CONTROLS */
.ds-sound-text,
.ds-fullscreen-btn,
.ds-exit-fullscreen-btn {
    position: absolute;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    z-index: 20;
    user-select: none;
}
.ds-sound-text {
    left: 20px;
    color: #333;
}
.ds-sound-text:hover {
    color: #0a4f57;
}
.ds-fullscreen-btn {
    right: 20px;
    background: #163C1C;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.ds-fullscreen-btn:hover {
    background: #0f2b0f;
    transform: translateY(-1px);
}
.ds-exit-fullscreen-btn {
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    display: none;
    z-index: 100;
}
.ds-exit-fullscreen-btn:hover {
    background: rgba(0,0,0,0.9);
}

/* LEVEL PICKER */
.ds-level-picker-container { 
    position: absolute; 
    top: 0; 
    left: 0; 
    z-index: 10; 
}
.ds-level-picker-container select {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--ds-secondary);
    outline: none;
}

/* CARD */
.ds-card {
    background: var(--ds-card-bg); 
    width: 100%; 
    border-radius: var(--ds-radius);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06); 
    padding: 40px;
    position: relative; 
    border: 1px solid var(--ds-border);
}
.ds-card.center-content { 
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 20px; 
}

/* TYPOGRAPHY */
h2, h3, h4 { 
    font-family: 'Merriweather', serif; 
    color: var(--ds-secondary); 
    margin: 0 0 10px 0; 
    text-transform: none !important;
}

/* HEADER */
.ds-header { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 25px; 
    color: #999; 
    font-weight: 600; 
    font-size: 13px; 
    text-transform: none !important;
}
.ds-progress span { 
    color: var(--ds-primary); 
}

/* SIGN IMAGE — Level 1 & 2 */
.ds-sign-image {
    width: 100%;
    height: 300px;
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    transition: opacity 0.2s;
}
.ds-sign-image img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

/* ✅ LEVEL 3: SIDE-BY-SIDE PAIR */
.ds-level3-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}
.ds-level3-sign {
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Needed for overlay absolute positioning */
}
.ds-level3-sign img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

/* LEVEL 3 NAME OVERLAY */
.ds-level3-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 79, 87, 0.9); /* Secondary color with opacity */
    color: white;
    padding: 10px 5px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    display: none;
    z-index: 10;
    line-height: 1.2;
    text-transform: none !important;
}

/* BUTTONS */
.ds-btn { 
    border: none; 
    padding: 16px 32px; 
    border-radius: 100px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    text-decoration: none; 
    display: inline-block; 
    text-align: center; 
}
.ds-btn-primary { 
    background-color: #163C1C; 
    color: white; 
}
.ds-btn-secondary { 
    background-color: var(--ds-secondary); 
    color: white; 
}
.ds-btn-premium { 
    background-color: #163C1C; 
    color: white; 
    width: 100%; 
    font-size: 1.1em; 
}
.ds-btn-premium:hover { 
    background-color: #0f2b0f; 
    transform: translateY(-1px); 
}
.ds-btn-primary:hover { 
    background-color: #0f2b0f; 
    transform: translateY(-1px); 
}

/* OPTIONS GRID */
.ds-grid-options { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}
.ds-option-btn {
    background: white; 
    border: 1px solid #ddd; 
    padding: 20px; 
    border-radius: 12px;
    font-size: 1rem; 
    color: var(--ds-text); 
    cursor: pointer; 
    transition: all 0.2s;
    text-align: center; 
    font-weight: 500; 
    position: relative;
    -webkit-tap-highlight-color: transparent;
    text-transform: none !important;
}
.ds-option-btn:focus {
    outline: none;
    border-color: var(--ds-primary);
}
.ds-option-btn:hover { 
    border-color: var(--ds-primary); 
    transform: translateY(-2px); 
}
.ds-option-btn.correct { 
    background-color: var(--ds-premium-green); 
    border-color: var(--ds-premium-green); 
    color: white; 
}
.ds-option-btn.correct::after { 
    content: " ✔"; 
    font-weight: bold; 
}
.ds-option-btn.wrong { 
    background-color: #ffcccc; 
    border-color: red; 
    color: #333; 
    opacity: 0.8; 
}
.ds-option-btn.wrong::after { 
    content: " ✖"; 
    font-weight: bold; 
    color: red; 
}

/* FEEDBACK & REVEAL */
.ds-feedback, 
.ds-reveal-content,
.ds-level3-reveal-content {
    margin-top: 25px; 
    padding: 20px; 
    background: #fdfbf7; 
    border-radius: 8px; 
    border: 1px solid #efece6; 
    text-align: left; 
}
.ds-hint-text { 
    text-align: center; 
    color: #999; 
    font-size: 0.85em; 
    margin-bottom: 15px; 
    font-style: italic; 
}

.ds-feedback-overlay-content {
    background: #fdfbf7;
    border: 1px solid #efece6;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}
.ds-feedback-overlay-content h4 {
    margin: 0 0 12px 0;
    color: var(--ds-secondary);
    font-size: 1.2em;
    text-transform: none !important;
}
.ds-feedback-overlay-content div {
    margin: 12px 0;
    line-height: 1.5;
}
.ds-feedback-overlay-content .ds-btn {
    margin-top: 15px;
}

/* LEVEL NAMES */
.ds-level2-name {
    background: var(--ds-secondary); 
    color: white; 
    padding: 8px 16px;
    border-radius: 20px; 
    font-weight: 600; 
    display: inline-block;
    font-size: 1.1em;
    margin: 8px 0;
}

.ds-level3-desc {
    font-size: 0.95em;
    line-height: 1.5;
    color: #555;
    text-transform: none !important;
}

#ds-reveal-title, .ds-pair-title {
    text-transform: none !important;
}

/* SUMMARY */
.ds-message {
    font-size: 1.2em;
    color: var(--ds-secondary);
    margin: 15px 0;
    font-weight: bold;
}
.ds-spinner { 
    border: 4px solid #f3f3f3; 
    border-top: 4px solid var(--ds-primary); 
    border-radius: 50%; 
    width: 40px; 
    height: 40px; 
    animation: spin 1s linear infinite; 
    margin: 50px auto; 
}
@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}
.ds-sm-text { 
    margin-top: 15px; 
    font-size: 0.85rem; 
}
.ds-sm-text a { 
    color: #666; 
    text-decoration: underline; 
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .ds-grid-options { 
        grid-template-columns: 1fr; 
    }
    .ds-wrapper { 
        padding-top: 60px; 
    }
    .ds-sound-text { 
        left: 10px; 
        font-size: 13px; 
    }
    .ds-fullscreen-btn, 
    .ds-exit-fullscreen-btn { 
        right: 10px; 
        padding: 6px 12px; 
        font-size: 13px; 
    }
    .ds-level3-pair {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .ds-sign-image,
    .ds-level3-sign {
        height: 240px;
    }
}