/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

h2 {
    font-family: 'Poppins', sans-serif;
    color: white;
    font-size: 2.2rem;
    margin: 0 auto 1rem;
    font-weight: 800;
}
h2 i {
    vertical-align: middle;
    font-size: 2rem !important;
}

.pencil img {
    width: 70px;
    height: 70px;
    padding: 10px;
    position: absolute;
    right: 5px;
    top: 5px;
}

/* Activity container - horizontal swipe */
.activity-container {
    display: flex;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    height: 100vh;
    width: 100vw;
    scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
.activity-container::-webkit-scrollbar {
    display: none;
}

.activity-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Individual activity section */
.activity {
    min-width: 100vw;
    max-width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1rem 3rem 0;
    position: relative;
}

.main-box,
.main-box-large {
    border-radius: 1rem;
    height: 75vh;
    position: relative;
}

.main-box-large {
    height: 82vh;
}

.light-bg {
    background: rgba(255,255,255,.6);
}

.dark-bg {
    background: #333;
}

/* Activity placeholder (for activities not yet implemented) */
.activity-placeholder {
    text-align: center;
    padding: 40px;
}

.activity-placeholder h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

/* --- Intro Section --- */
.intro-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-container {
    text-align: center;
}

.intro-container h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 400%;
    color: white;
    margin: 2px auto 20px;
}

.student-photo-container {
    cursor: pointer;
    transition: transform 0.2s;
}

.student-photo-container:hover {
    transform: scale(1.05);
}

.student-photo-container:active {
    transform: scale(0.95);
}

.student-photo {
    object-fit: cover;
    width: 300px;
    border-radius: 150px;
    border: white solid 2px;
    margin: 10px;
    cursor: pointer;
}

.tap-instruction {
    font-family: 'Poppins', sans-serif;
    font-size: 200%;
    color: white;
    margin: 20px auto 0;
    text-transform: none;
    font-weight: 800;
}

.instruction-highlight {
    color: lightpink;
}

/* --- Sight Words Activity (act_id 23) --- */
.cover-check {
    background: rgba(255,255,255,.4);
    padding: 0 1rem;
    border-radius: .5rem;
}

.sight-words-container {
    width: 100%;
    text-align: center;
}

.word-display {
    font-size: 10rem;
    font-weight: 400;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    font-family: "Lexend Deca", sans-serif;
    line-height: 1rem !important;
}

/* --- Letters Activity (act_id 10) --- */
.letters-container {
    width: 100%;
    text-align: center;
}

.letters-display {
    position: relative !important;
    font-size: 1rem;
}

.letters-display .video-wrapper {
    padding: 1rem;
    width: 100%;
    height: 100%;
}

.letters-container .letter-head {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    gap: 1rem;
    margin-bottom: 1rem;
}

.letters-container .letter-head img {
    height: 4rem;
}

.letters-container iframe {
    height: 27rem;
}

.letters-container .letter-prompt {
    font-size: 1.6rem;
    font-weight: 500;
    margin: 1rem 0;
}

.letters-container .word-controls {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.letters-container .word-controls button {
    pointer-events: all;
}

.letter-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    padding: 10px;
}

.letter-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid white;
    background: transparent;
    transition: background-color 0.3s ease;
}

.letter-dot.filled {
    background: white;
}


.current-word {
    margin-top: -2rem;
}

.word-cover {
    position: absolute;
    background: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.5em;
    color: #666;
    width: 60rem;
    height: 20rem;
    border-radius: 1rem;
}

.word-cover.active {
    display: flex;
}

.word-controls {
    display: flex;
    justify-content: space-between;
    position: absolute;
    width: 100%;
    height: 100%;
    align-items: center;
    z-index: 5;
    pointer-events: none;
}

.word-controls button {
    background: white;
    border-radius: 4rem;
    height: 7rem;
    width: 7rem;
    color: black;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    pointer-events: auto;
}

.word-controls button i {
    font-size: 3.5rem;
    padding-left: 1rem;
}

.word-controls .next-btn {
    margin-right: -2rem;
}

.word-controls .prev-btn {
    margin-left: -2rem;
}

.audio-at-bottom {
    position: absolute;
    bottom: 3rem;
    margin: 0 auto;
    width: 100%;
}

.sight-controls {
    margin-top: 40px;
}

.sight-controls button {
    font-size: 1.5em;
    padding: 15px 40px;
    margin: 10px;
    border: none;
    border-radius: 10px;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}


.sight-controls button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sight-controls .cover-btn {
    background: #2196F3;
}

.sight-controls .check-btn {
    background: #FF9800;
}

.word-counter {
    font-size: 1.2em;
    margin-top: 20px;
    color: #666;
}

.word-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    padding: 10px;
}

.word-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid white;
    background: transparent;
    transition: background-color 0.3s ease;
}

.word-dot.filled {
    background: white;
}

/* --- Word Lists Activity --- */
.word-lists-display {
    display: flex;
    gap: 2rem;
    justify-content: space-around;
    align-items: flex-start;
    padding: 3rem 2rem;
    height: 100%;
    width: 100%;
}

.word-list-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 28%;
}

.word-list-item {
    background: white;
    padding: .3rem .5rem .7rem;
    border-radius: 0.75rem;
    font-size: 2.5rem;
    font-family: "Lexend Deca", sans-serif;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.word-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    background: #f0f8ff;
}

.word-list-item:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* --- If I Can Spell Activity --- */
.if-i-can-spell-container {
    width: 100%;
    text-align: center;
}

.if-spell-display {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    height: 100%;
    width: 100%;
    gap: 2rem
}

.if-spell-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,.6);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.if-spell-header {
    font-size: 2.5rem;
    font-family: "Lexend Deca", sans-serif;
    text-align: center;
    margin-bottom: 1rem;
}

.pattern-prefix {
    font-size: 2.5rem;
    font-weight: 400;
}

.pattern-word {
    font-weight: 700;
    color: deeppink;
    font-size: 3rem;
}

.pattern-image {
    text-align: center;
    margin: 0;
}

.pattern-image img {
    height: 4rem;
    width: auto;
    object-fit: contain;
}

.if-spell-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 1rem 0;
}

.if-spell-play-btn {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 1.5rem 3rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.if-spell-play-btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

.if-spell-play-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.if-spell-play-btn i {
    font-size: 2rem;
}

.if-spell-audio {
    margin: 0;
}

.if-spell-audio audio {
    width: 100%;
    max-width: 300px;
}

.if-spell-reveal {
    min-height: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem
}

.if-spell-reveal i {
    font-size: 3rem;
    color: white
}

.if-spell-eye:hover {
    transform: scale(1.1);
    color: #c71585;
}

.if-spell-reveal i:hover {
    color: deeppink !important;
}

.if-spell-word-reveal {
    font-size: 3rem;
    font-weight: 400;
    font-family: "Lexend Deca", sans-serif;
    color: #333;
    visibility: hidden;
    min-height: 3.5rem;
}

.if-spell-word-reveal.visible {
    visibility: visible;
}

.if-spell-word-reveal .pattern-part {
    font-weight: 700;
    color: deeppink;
}

.if-spell-nav-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 3rem 0 0;
}

.if-spell-back-btn {
    background: white;
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    visibility: hidden; /* Hidden by default */
}

.if-spell-back-btn.visible {
    visibility: visible;
}

.if-spell-back-btn:hover {
    transform: scale(1.05);
}

.if-spell-back-btn:active {
    transform: scale(0.95);
}

.if-spell-back-btn i {
    font-size: 1.6rem;
}

.if-spell-next-btn {
    background: lightblue;
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    visibility: visible; /* Visible by default */
}

.if-spell-next-btn.visible {
    visibility: visible;
}

.if-spell-next-btn.done {
    background: lightgreen;
}

.if-spell-next-btn.done:hover {
    background: lightgreen;
    transform: scale(1.05);
}

.if-spell-next-btn.woohoo {
    box-shadow: none;
    background: none;
    pointer-events: none;
    color: salmon;
    font-weight: 800

}

.if-spell-next-btn.woohoo:hover {
    transform: none;
}

.if-spell-next-btn:hover {
    transform: scale(1.05);
}

.if-spell-next-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.if-spell-next-btn i {
    font-size: 1.6rem;
}

/* --- Flipbook Activity (act_id 100) --- */
.flipbook-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.flipbook-container h2 {
    margin-bottom: 0;
}

.book {
    width: 100%;
    height: 82%;
    border: none;
    border-radius: 1rem;
}

.book-audio-controls audio {
    width: 100vw;
    padding: 0 3rem;
}

/* --- Tapping Sight Words Activity --- */
.answer-box {
    background: white;
    border: 3px solid lightblue;
    border-radius: .5rem;
    height: 180px;
    font-size: 130px;
    font-weight: 400;
    text-align: center;
    margin: 2rem;
    letter-spacing: 0.03em;
    overflow: hidden;
    font-family: "Lexend Deca", sans-serif;
}

.answer-box img {
    height: 170px;
    float: left;
    padding: 10px 20px;
}

.comprehension-answer-box {
    background: rgba(255,255,255,.8);
    margin-bottom: 4rem;
    border: none;
    line-height: 4.5rem;
    padding: 1rem 2rem !important;
    text-align: left
}

.letter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .7rem;
    margin-bottom: 2rem;
}

.letter-btn {
    background: lightgreen;
    color: black;
    border: 2px white solid;
    border-radius: .5rem;
    font-size: 60px;
    font-weight: 500;
    cursor: pointer;
    min-width: 60px;
    transition: all 0.3s;
    font-family: "Lexend Deca", sans-serif;
    width: 100px !important;
    height: 100px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.letter-btn:hover:not(:disabled) {
    background: #45a049;
    transform: scale(1.1);
}

.letter-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.scramble-controls {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin: 4rem auto 2rem;
    align-items: center;
    background: rgba(255,255,255,.4);
    width: fit-content;
    padding: 1rem;
    border-radius: .5rem;
}

.scramble-controls div audio {
    margin: 0 3rem 0 0;
}

.erase-btn, .check-btn {
    height: 6rem;
    width: 6rem;
    font-size: 4rem;
    border: solid 2px rgba(255,255,255,.6);
    border-radius: .5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-weight: bold;
}

.erase-btn i,
.check-btn i {
    font-size: 3rem;
}

.erase-btn {
    background: #ebd9fc;
}

.erase-btn:hover {
    background: #e68900;
}

.check-btn {
    background: #b8f9b8;
}

.check-btn:hover {
    background: #b8f9b8;
}

.got-it-btn {
    height: 6rem;
    width: auto;
    padding: 0 2rem;
    font-size: 1.8rem;
    border: solid 2px rgba(255,255,255,.6);
    border-radius: .5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-weight: bold;
    background: lightgreen;
}

.got-it-btn:hover {
    background: #5a9b5a;
    transform: scale(1.05);
}

.got-it-btn i {
    font-size: 2rem;
}

.not-quite-btn {
    height: 6rem;
    width: auto;
    padding: 0 2rem;
    font-size: 1.8rem;
    border: solid 2px rgba(255,255,255,.6);
    border-radius: .5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-weight: bold;
    background: lightpink;
}

.not-quite-btn:hover {
    background: lightpink;
    transform: scale(1.05);
}

.feedback-message {
    text-align: center;
    font-size: 10rem;
    font-weight: bold;
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5rem 0;
}

.feedback-message.correct {
    color: white;
}

.feedback-message.incorrect {
    color: #f44336;
}

.next-word-container {
    text-align: center;
    margin: 1.5rem 0;
}

.next-word-btn {
    background: #9C27B0;
    color: white;
    border: none;
    border-radius: 1rem;
    padding: 1.2rem 3rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s;
}

.next-word-btn:hover {
    background: #7B1FA2;
    transform: scale(1.05);
}

.word-dot.completed {
    background: lightgreen;
}

/* --- Sentence Building Activity (act_id 125) --- */
.sentence-container {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h2 {
    margin-bottom: .5rem;
}

.sentence-display {
    min-height: 150px;
    margin: 30px 0;
    font-size: 2em;
}

.word-bubble {
    display: inline-block;
    background: white;
    padding: 15px 25px;
    margin: 5px;
    border-radius: 25px;
    font-size: 1.2em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    user-select: none;
}

/* Free-form draggable word bubbles */
.sentence-workspace {
    position: relative;
    width: 100%;
    height: 81vh;
    background: #333;
    border-radius: 1rem;
    margin: 0;
}

/* Temporary flex container for initial layout */
.word-flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 2rem;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
}

.word-bubble-temp {
    background: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1.5em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.draggable-word-bubble {
    background: lightblue;
    border: white solid 2px;
    font-family: "Lexend Deca", sans-serif;
    padding: 10px 20px 10px;
    border-radius: .5rem;
    font-size: 46px;
    cursor: move;
    user-select: none;
    touch-action: none;
    z-index: 1;
}

.draggable-word-bubble:active {
    cursor: grabbing;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.sent-line {
    width: 90%;
    height: 7rem;
    border-top: red solid 3px;
    border-bottom: red solid 3px;
    margin: 15% auto 0;
}

/* Remove old drop zone styles - no longer needed */
.drop-zone {
    display: none;
}

.sentence-audio {
    margin-top: 20px;
}

.sentence-audio audio {
    width: 60vw;
    height: 40px;
}

.sentence-instructions {
    font-size: 1.3em;
    margin: 20px 0;
    font-weight: bold;
}





/* --- Elkonin Boxes Activity --- */
.boxes-button {
    position: absolute;
    bottom: 10rem;
    width: 100%;
    text-align: center;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
    z-index: 10;
}

.boxes-button:hover {
    opacity: 1;
}

.boxes-button img {
    width: 75px;
    height: auto;
    pointer-events: auto;
}

.letter-box {
    min-height: 150px;
    padding: 10px 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: margin 0.6s ease-in-out, padding 0.6s ease-in-out, color 1s ease;
}

.letter-box.spread {
    padding: 10px 40px 30px;
    margin: 0 -3px;
    border: 6px solid rgba(0,0,0,0);
}

.letter-box.with-border {
    border-top: 6px solid #6C697B;
    border-bottom: 6px solid #6C697B;
    border-left: 6px solid #6C697B;
    border-right: 6px solid #6C697B;
    transition: border 0.4s ease-in-out 1s;
}

.letter-box.silent.with-border {
    border: none !important;
}

.letter-box.chunk-letter {
    color: deeppink;
}

.elkonin-audio-hidden {
    opacity: 0;
    transition: opacity 0.5s linear;
}

.elkonin-audio-visible {
    opacity: 1;
    transition: opacity 0.5s linear 1s;
}

.word-display {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.current-word {
    font-size: 8rem;
    display: flex;
    align-items: center;
}

/* --- Chunking Activity --- */
.chunk-pattern {
    color: deeppink;
}

/* --- Tapping Words Activity --- */
.tapping-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin-bottom: 2rem;
    margin: 2rem
}

.tapping-column {
    padding: 1rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: flex-start;
    justify-content: center;
    border: red solid 3px;
}

.tapping-grid .tapping-column:first-child {
    border-right: none
}

.tapping-grid .tapping-column:last-child {
    border-left: none
}

.tapping-btn {
    background: lightblue;
    border: white solid 3px;
    font-family: "Lexend Deca", sans-serif;
    padding: 4px 17px 8px;
    border-radius: .5rem;
    font-size: 3rem;
    cursor: pointer;
    min-width: 80px;
    transition: all 0.3s;
    font-weight: 500;
}

.tapping-btn:hover {
    transform: scale(1.05);
    background: #87CEEB;
}

.tapping-btn:active {
    transform: scale(0.95);
}

.tapping-column:last-child .tapping-btn {
    background: salmon
}

.tapping-column:first-child .tapping-btn {
    background: lightgreen
}

.tapping-btn.selected {
    background: lightseagreen !important;
    border-color: white;
}

.tapping-controls {
    background: none;
    position: absolute;
    bottom: -1.2rem;
    right: 1rem;
}

.tapping-controls .erase-btn {
    background: pink;
    width: 5rem;
    height: 5rem
}

.tapping-block-pink {
    color: deeppink;
}

/* --- Sentence Building Activity - Smaller Fonts --- */
.sentence-building-activity .tapping-btn {
    font-size: 2rem;
    padding: 8px 14px 10px;
    min-width: auto;
}

.sentence-building-activity .answer-box {
    font-size: 3rem;
    min-height: 6.5rem;
    padding: 1rem 0;
    font-weight: 500;
    /*! display: flex; */
    justify-content: center;
    align-items: center;
    gap: 1rem;
    height: fit-content;
    /*! text-align: left; */
    padding: .5rem 1.8rem .8rem;
    line-height: 1.2;
    border: solid 4px #FFCE31
}

/* Fix middle column spacing issue */
.tapping-column {
    align-content: flex-start;
}

/* --- Sentence Chunking Activity - Smaller Font --- */
.sentence-chunking-activity .current-word {
    font-size: 3.5rem;
    display: block !important;
    white-space: pre-wrap;
}

.mastered-chunk-pattern {
    color: purple;
}

/* ============================================
 *  FULLSCREEN TOGGLE BUTTONS
 *  ============================================ */

.fullscreen-controls {
    position: fixed;
    bottom: 12px;
    right: 12px;
    z-index: 9999;
}

.fullscreen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.fullscreen-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.fullscreen-btn:active {
    transform: scale(0.95);
}

.fullscreen-btn .material-icons {
    font-size: 28px;
}

/* Optional: Hide on very small screens if needed */
@media (max-width: 480px) {
    .fullscreen-controls {
        bottom: 10px;
        right: 10px;
    }

    .fullscreen-btn {
        width: 45px;
        height: 45px;
    }

    .fullscreen-btn .material-icons {
        font-size: 24px;
    }
}

/* ============================================
 *  RECORDING ACTIVITY STYLES
 *  Add these to student.css
 *  ============================================ */

/* Recording status display */
.recording-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    gap: 1rem;
}

.status-icon {
    font-size: 5rem;
    color: #2196F3;
    transition: color 0.3s ease;
}

.status-icon i {
    font-size: 5rem !important;
}

.status-text {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

/* Waveform animation */
.waveform-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 80px;
    margin: 2rem 0;
}

.waveform-bar {
    width: 8px;
    background: #f44336;
    border-radius: 4px;
    animation: waveform 1s ease-in-out infinite;
}

.waveform-bar:nth-child(1) { animation-delay: 0s; }
.waveform-bar:nth-child(2) { animation-delay: 0.2s; }
.waveform-bar:nth-child(3) { animation-delay: 0.4s; }
.waveform-bar:nth-child(4) { animation-delay: 0.6s; }
.waveform-bar:nth-child(5) { animation-delay: 0.8s; }

@keyframes waveform {
    0%, 100% { height: 20px; }
    50% { height: 60px; }
}

/* Playback container */
.playback-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

/* Recording controls */
.recording-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.recording-controls button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    font-size: 1.6rem;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-family: 'Poppins', sans-serif;
}

.recording-controls button i {
    font-size: 2rem !important;
}

.recording-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.recording-controls button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Specific button styles */
.record-btn {
    background: #f44336;
    color: white;
}

.record-btn:hover {
    background: #d32f2f;
}

.stop-btn {
    background: #FF9800;
    color: white;
}

.stop-btn:hover {
    background: #F57C00;
}

.play-btn {
    background: #4CAF50;
    color: white;
}

.play-btn:hover {
    background: #388E3C;
}

.save-btn {
    background: #2196F3;
    color: white;
}

.save-btn:hover {
    background: #1976D2;
}

.rerecord-btn {
    background: #9C27B0;
    color: white;
}

.rerecord-btn:hover {
    background: #7B1FA2;
}

/* Save feedback */
.save-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: #4CAF50;
    color: white;
    border-radius: 0.75rem;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 2rem auto;
    max-width: 400px;
    animation: slideIn 0.5s ease;
}

.save-feedback i {
    font-size: 2.5rem !important;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .recording-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .recording-controls button {
        width: 100%;
        max-width: 300px;
    }
}

/* cloze */

.cloze-choices-column {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    border: none;
    gap: 1rem
}

.comp-blank-word {
    background: white;
    padding: 0 .9rem .3rem;
    border-radius: .5rem;
    min-width: 7rem !important;
    display: inline-block;
    height: 4rem !important;
    vertical-align: middle;
    margin: 0 .5rem
}

.comp-choices-grid {
    gap: 2rem !important
}

button.comp-choice-btn {
    font-size: 3rem !important
}

.cloze-question {
    font-family: "Lexend Deca", sans-serif;
    font-size: 3rem;
    font-weight: 600;
    color: #ddd;
    text-align: left;
    padding: 1.5rem 2rem 0;
    margin-bottom: 4rem;
    flex-direction: row-reverse;
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    line-height: 1.2;
    align-items: center
}

.cloze-audio-btn {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    width: 4rem;
    height: 4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.cloze-audio-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.cloze-audio-btn .material-icons {
    font-size: 2.2rem;
    color: white;
}

button.comp-erase-btn {
    background: #ffb3c1 !important;
    color: #333 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 84px;
}

button.comp-erase-btn .material-icons {
    font-size: 3rem !important;
    line-height: 1;
}

/* ============================================ */
/* --- Affixes Activity (act_id 40) --- */
/* ============================================ */

.affixes-activity-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 2rem;
}

.affix-directions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding: 2rem;
    cursor: pointer;
    box-sizing: border-box;
}

.affix-directions-text {
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    text-align: center;
    line-height: 1.8;
    color: #333;
    font-family: "Lexend Deca", sans-serif;
}

.affix-directions-text strong {
    color: #111;
}

.affix-word-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 6;
}

.affix-word-display .affix-word-text,
.affix-word-display .affix-eye-btn {
    pointer-events: auto;
}

.affix-word-text {
    font-size: clamp(5rem, 12vw, 10rem);
    font-weight: 400;
    font-family: "Lexend Deca", sans-serif;
    line-height: 1.1;
    text-align: center;
    color: #333;
}

.affix-highlight {
    transition: opacity 0.5s ease;
}

.affix-highlight.faded {
    opacity: 0.25;
}

.affix-eye-btn {
    background: rgba(255,255,255,0.7);
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 50%;
    width: 5rem;
    height: 5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0,0,0,0.4);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    /* Ensure it sits above word-controls */
    position: relative;
    z-index: 10;
    margin-top: 2rem
}

.affix-eye-btn .material-icons {
    font-size: 2.8rem;
}

.affix-eye-btn:hover,
.affix-eye-btn.active {
    color: rgba(0,0,0,0.8);
    border-color: rgba(0,0,0,0.4);
    background: rgba(255,255,255,0.95);
}

.affix-tap-hint {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0,0,0,0.35);
    animation: affix-pulse 1.5s ease-in-out infinite;
}

.affix-tap-hint .material-icons {
    font-size: 3rem;
}

@keyframes affix-pulse {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50%       { opacity: 0.8; transform: translateX(6px); }
}

/* Audio inside affix word display — override absolute positioning */
