/* =========================================
   WETENSKAP FLASHCARDS V3.0 STYLES
========================================= */

:root {
    --ws-text: #202938;
}

.ws-app-container {
    height: 200vh;
    width: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    position: relative;
    background: #f8fafc;
    font-family: system-ui, -apple-system, sans-serif;
}

.ws-screen {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ws-flashcards {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 16px;
    box-sizing: border-box;
    color: var(--ws-text, #202938);
}

.ws-flash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.ws-flash-header h1 {
    font-size: 28px;
    margin: 6px 0;
}

.ws-flash-header p {
    color: #84909e;
    margin: 0;
    font-size: 13px;
}

.ws-flash-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #5278db;
}

.ws-section-block {
    margin-bottom: 16px;
}

.ws-section-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #84909e;
    margin-bottom: 8px;
}

.ws-subject-tabs {
    display: flex;
    gap: 10px;
}

.ws-tab-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #dce1e8;
    background: white;
    border-radius: 9px;
    font-weight: 650;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s;
}

.ws-tab-btn.is-active {
    background: #263f78;
    border-color: #263f78;
    color: white;
}

/* CHIPS CONTAINER - EXPANDED WITHOUT SCROLLING */
.ws-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.ws-chip {
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid #dce1e8;
    background: white;
    color: #475569;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    transition: all 0.2s;
}

.ws-chip.is-active {
    background: #5278db;
    border-color: #5278db;
    color: #fff;
    font-weight: 600;
}

.ws-flash-mode-buttons {
    display: flex;
    gap: 9px;
}

.ws-mode-btn {
    flex: 1;
    border: 1px solid #dce1e8;
    background: white;
    border-radius: 9px;
    padding: 10px;
    cursor: pointer;
    font-weight: 650;
    font-size: 12px;
    color: #475569;
}

.ws-mode-btn.is-active {
    background: #263f78;
    border-color: #263f78;
    color: white;
}

.ws-start-btn {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    transition: background 0.2s;
}

.ws-start-btn:hover {
    background: #1d4ed8;
}

/* PROGRESS */

.ws-flash-progress {
    margin-bottom: 20px;
}

.ws-flash-progress-info {
    display: flex;
    justify-content: space-between;
    color: #84909e;
    font-size: 12px;
    margin-bottom: 8px;
}

.ws-flash-progress-track {
    height: 7px;
    border-radius: 20px;
    overflow: hidden;
    background: #e9edf3;
}

#ws-flash-progress-bar {
    height: 100%;
    width: 0;
    background: #36a77b;
    border-radius: inherit;
    transition: width .3s ease;
}

/* FLASHCARD */

.ws-flash-stage {
    width: 100%;
}

.ws-flash-card {
    background: white;
    border: 1px solid #e4e9f0;
    border-radius: 20px;
    min-height: 340px;
    padding: 22px;
    box-shadow: 0 15px 45px rgba(25, 40, 65, .08);
    touch-action: pan-y;
    user-select: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color .2s, box-shadow .2s;
}

.ws-flash-card.is-revealed {
    border-color: #a8c4ef;
    box-shadow: 0 15px 45px rgba(50, 90, 150, .12);
}

.ws-flash-card-top,
.ws-flash-card-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #929ba8;
    font-size: 11px;
}

.ws-flash-card-category {
    color: #5278db;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.ws-flash-card-number {
    font-weight: 600;
}

.ws-flash-card-main {
    margin: 15px auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ws-flash-prompt {
    font-size: clamp(20px, 4vw, 26px);
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
}

/* REVEALED ANSWER */

.ws-flash-answer {
    margin-top: 16px;
    padding: 14px;
    background: #edf3ff;
    border-left: 4px solid #5278db;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    animation: ws-flash-reveal .25s ease;
    text-align: left;
}

.ws-flash-answer[hidden] {
    display: none;
}

.ws-flash-answer > span {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #5278db;
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.ws-flash-answer > div {
    font-size: 15px;
    line-height: 1.5;
    color: #1e293b;
    overflow-wrap: anywhere;
}

/* TAP INSTRUCTION */

.ws-flash-tap-hint {
    text-align: center;
    color: #929ba8;
    font-size: 11px;
    margin-top: 16px;
    pointer-events: none;
}

.ws-flash-tap-hint span {
    display: inline-block;
    margin-right: 4px;
    font-size: 13px;
    color: #5278db;
}

.ws-flash-tap-hint.is-revealed {
    color: #21855c;
    font-weight: 700;
}

.ws-flash-tap-hint.is-revealed span {
    color: #21855c;
}

/* SWIPE INSTRUCTIONS GUIDE */

.ws-flash-swipe-guide {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 16px;
    padding: 0 4px;
}

.ws-flash-guide-left,
.ws-flash-guide-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ws-flash-guide-left > span,
.ws-flash-guide-right > span {
    font-size: 22px;
    font-weight: 700;
}

.ws-flash-guide-left > span {
    color: #d75a5a;
}

.ws-flash-guide-right > span {
    color: #23996c;
}

.ws-flash-guide-left strong,
.ws-flash-guide-right strong {
    display: block;
    font-size: 11px;
    color: #475569;
}

.ws-flash-guide-left small,
.ws-flash-guide-right small {
    display: block;
    color: #929ba8;
    font-size: 10px;
}

.ws-scroll-hint {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 16px;
}

/* COMPLETED / EMPTY */

.ws-flash-complete,
.ws-flash-empty {
    background: white;
    border: 1px solid #e4e9f0;
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 15px 45px rgba(25, 40, 65, .07);
}

.ws-flash-complete-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #e1f5eb;
    font-size: 28px;
}

.ws-flash-complete h2,
.ws-flash-empty h2 {
    font-size: 24px;
    margin: 0 0 8px 0;
}

.ws-flash-complete p,
.ws-flash-empty p {
    color: #84909e;
    margin: 0;
    font-size: 14px;
}

.ws-flash-complete-stats {
    display: flex;
    flex-direction: column;
    margin: 20px 0;
}

.ws-flash-complete-stats strong {
    font-size: 38px;
    color: #23996c;
}

.ws-flash-complete-stats span {
    color: #84909e;
    font-size: 12px;
}

.ws-flash-restart {
    border: none;
    border-radius: 10px;
    background: #263f78;
    color: white;
    padding: 12px 20px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}

.ws-flash-loading {
    text-align: center;
    padding: 40px;
    color: #84909e;
}

/* ANIMATION */

@keyframes ws-flash-reveal {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}