/* SET YOUR GAME'S COLOR THEME HERE */
:root {
    --primary-color: #dc3545;
    --primary-hover: #ff6347;
    --hero-gradient-start: rgba(220, 53, 69, 0.1);
    --hero-gradient-end: rgba(255, 99, 71, 0.1);
    --section-bg-start: rgba(220, 53, 69, 0.05);
    --section-bg-end: rgba(255, 99, 71, 0.05);
    --primary-shadow: rgba(220, 53, 69, 0.3);
    --feature-shadow: rgba(220, 53, 69, 0.15);
    --focus-shadow: rgba(220, 53, 69, 0.25);
    --mode-shadow: rgba(220, 53, 69, 0.2);
    --btn-shadow: rgba(220, 53, 69, 0.4);
    --summary-bg-start: rgba(220, 53, 69, 0.1);
    --summary-bg-end: rgba(255, 99, 71, 0.05);
    --accordion-icon-filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
    --btn-text-color: #ffffff;
}

.game-stats {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1rem;
}

.game-stats .stat-card {
    flex: 1;
    min-width: 0;
}

.word-counter {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--section-bg-start);
    border-radius: 0.75rem;
}

/* Audio Section */
.audio-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(132, 220, 198, 0.05);
    border-radius: 0.75rem;
    border: 2px solid rgba(132, 220, 198, 0.2);
}

.audio-player-wrapper {
    display: none;
}

.audio-player-wrapper.show {
    display: block;
}

.audio-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    text-align: center;
}

/* Responsive audio section */
@media (max-width: 768px) {
    .audio-section {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
}

.feedback-message {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1rem 0;
    min-height: 2rem;
}

.feedback-correct {
    color: #28a745;
}

.feedback-incorrect {
    color: #dc3545;
}

.definition-area {
    background: var(--section-bg-start);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e9ecef;
}

.definition-text {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: center;
    font-style: italic;
}

/* Plyr styling - minimal controls */
.plyr {
    border-radius: 0.5rem;
    background: white;
}

.plyr--audio .plyr__controls {
    background: rgba(132, 220, 198, 0.15);
    padding: 1rem;
    border-radius: 0.5rem;
    color: var(--primary-color);
}

.plyr__control--overlaid {
    display: none !important;
}

.plyr__controls .plyr__volume,
.plyr__controls [data-plyr="mute"],
.plyr__controls .plyr__time,
.plyr__controls .plyr__menu,
.plyr__controls [data-plyr="settings"],
.plyr__controls [data-plyr="fullscreen"],
.plyr__controls [data-plyr="download"] {
    display: none !important;
}

.plyr__control {
    color: var(--primary-color);
}

.plyr__control:hover {
    background: rgba(132, 220, 198, 0.2);
}

.plyr__control svg {
    fill: var(--primary-color);
}

.plyr--audio .plyr__control.plyr__tab-focus,
.plyr--audio .plyr__control:hover,
.plyr--audio .plyr__control[aria-expanded="true"] {
    background: rgba(132, 220, 198, 0.3);
}

.letter-pool, .answer-area {
    margin: 2rem 0;
}

.pool-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.letters-container {
    display: flex;
    flex-wrap: nowrap; /* Keep all letters on one line */
    justify-content: center;
    gap: 0.75rem;
    min-height: 80px;
    padding: 1rem;
    background: var(--section-bg-start);
    border-radius: 0.75rem;
    border: 2px dashed #dee2e6;
    overflow-x: auto; /* Allow horizontal scroll if needed */
    overflow-y: hidden;
}

/* Scrollbar styling for letters container */
.letters-container::-webkit-scrollbar {
    height: 6px;
}

.letters-container::-webkit-scrollbar-track {
    background: transparent;
}

.letters-container::-webkit-scrollbar-thumb {
    background: rgba(220, 53, 69, 0.3);
    border-radius: 3px;
}

.letters-container::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 53, 69, 0.5);
}

.answer-slots {
    display: flex;
    flex-wrap: nowrap; /* Keep all slots on one line */
    justify-content: center;
    gap: 0.75rem;
    min-height: 80px;
    padding: 1rem;
    background: var(--section-bg-start);
    border-radius: 0.75rem;
    border: 2px dashed #dee2e6;
    overflow-x: auto; /* Allow horizontal scroll if needed */
    overflow-y: hidden;
}

/* Hide scrollbar but keep functionality */
.answer-slots::-webkit-scrollbar {
    height: 6px;
}

.answer-slots::-webkit-scrollbar-track {
    background: transparent;
}

.answer-slots::-webkit-scrollbar-thumb {
    background: rgba(220, 53, 69, 0.3);
    border-radius: 3px;
}

.answer-slots::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 53, 69, 0.5);
}

.letter-card {
    width: 60px;
    height: 60px;
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.letter-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.letter-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.letter-card:active {
    transform: scale(0.95);
}

.answer-slot {
    width: 60px;
    height: 60px;
    background: white;
    border: 3px dashed #dee2e6;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    position: relative;
    transition: all 0.3s ease;
}

.answer-slot.filled {
    border-style: solid;
    border-color: var(--primary-color);
    background: #fff;
    cursor: pointer;
}

.answer-slot.filled:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px var(--primary-shadow);
}

.answer-slot.drag-over {
    background: var(--section-bg-start);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.slot-number {
    position: absolute;
    top: -10px;
    left: -10px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Responsive sizing for smaller screens */
@media (max-width: 768px) {
    .pool-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .answer-slot, .letter-card {
        width: 45px;
        height: 45px;
        font-size: 1.4rem;
    }

    .answer-slots, .letters-container {
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .slot-number {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
        top: -7px;
        left: -7px;
    }
}

@media (max-width: 480px) {
    .pool-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .letter-pool p, .answer-area p {
        font-size: 0.8rem !important;
        margin-bottom: 0.75rem !important;
    }

    .answer-slot, .letter-card {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
        border-width: 2px;
    }

    .answer-slots, .letters-container {
        gap: 0.3rem;
        padding: 0.5rem;
    }

    .slot-number {
        width: 14px;
        height: 14px;
        font-size: 0.55rem;
        top: -6px;
        left: -6px;
    }
}

@media (max-width: 380px) {
    .pool-title {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }

    .letter-pool p, .answer-area p {
        font-size: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }

    .answer-slot, .letter-card {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
        border-width: 2px;
    }

    .answer-slots, .letters-container {
        gap: 0.25rem;
        padding: 0.4rem;
    }

    .slot-number {
        width: 13px;
        height: 13px;
        font-size: 0.5rem;
        top: -5px;
        left: -5px;
    }
}

.btn-submit-answer {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-size: 1.3rem;
    padding: 1rem 3rem;
    font-weight: 700;
    border: none;
    border-radius: 2rem;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    width: 100%;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-answer:hover {
    background: linear-gradient(135deg, #218838 0%, #1fa589 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

.btn-submit-answer:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn-game-action {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 2rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-hint {
    background: #17a2b8;
    color: white;
}

.btn-hint:hover {
    background: #138496;
    transform: translateY(-2px);
}

.btn-clear {
    background: #ffc107;
    color: #212529;
}

.btn-clear:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-skip {
    background: #6c757d;
    color: white;
}

.btn-skip:hover {
    background: #545b62;
    transform: translateY(-2px);
}

@keyframes flash-correct {
    0%, 100% {
        background-color: transparent;
        border-color: transparent;
    }
    50% {
        background-color: rgba(76, 175, 80, 0.2);
        border: 3px solid #4caf50;
    }
}

@keyframes flash-wrong {
    0%, 100% {
        background-color: transparent;
        border-color: transparent;
    }
    50% {
        background-color: rgba(244, 67, 54, 0.2);
        border: 3px solid #f44336;
    }
}

.content-card.flash-correct {
    animation: flash-correct 0.6s ease;
}

.content-card.flash-wrong {
    animation: flash-wrong 0.6s ease;
}

.flash-correct {
    animation: flashCorrect 800ms ease;
}

.flash-wrong {
    animation: flashWrong 800ms ease;
}

@keyframes flashCorrect {
    0% {
        background: rgba(76,175,80,0);
    }
    50% {
        background: rgba(76,175,80,0.5);
    }
    100% {
        background: rgba(76,175,80,0);
    }
}

@keyframes flashWrong {
    0% {
        background: rgba(244,67,54,0);
    }
    50% {
        background: rgba(244,67,54,0.5);
    }
    100% {
        background: rgba(244,67,54,0);
    }
}

.step.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.step.clickable:hover {
    transform: scale(1.05);
}

.step.clickable:hover .step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step.locked {
    cursor: not-allowed;
    opacity: 0.5;
}

.step.locked:hover {
    transform: none;
}
