/**
 * @author      Mike Fairbrother <mike@fairbrother.me>
 * @copyright   2024-2026 Mike Fairbrother. All rights reserved.
 * @license     PROPRIETARY - No rights to copy, modify, distribute, or reuse
 *              any part of this code without explicit written permission from the author.
 */
/* ---- Fraction Kitchen Styles ---- */

.fk-logo {
    font-size: 64px;
    margin-bottom: 8px;
    text-align: center;
    filter: drop-shadow(0 4px 20px rgba(255, 150, 50, 0.3));
}
.fk-title {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #ff9f43, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}
.fk-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    text-align: center;
    margin-bottom: 16px;
}
.menu-best {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    text-align: center;
    margin-bottom: 20px;
}

/* Difficulty selector */
.fk-difficulty {
    margin: 0 0 20px;
    text-align: center;
}
.fk-diff-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 8px;
}
.fk-diff-pills {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}
.fk-pill {
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 150ms;
    font-family: inherit;
}
.fk-pill.active {
    background: linear-gradient(135deg, rgba(255,159,67,0.2), rgba(255,107,107,0.15));
    border-color: rgba(255,159,67,0.35);
    color: #ff9f43;
}

/* Game area */
#game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 20px 16px;
    position: relative;
}

.fk-prompt {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    text-align: center;
    margin-bottom: 20px;
    min-height: 24px;
}

/* Portion bar container */
.fk-portion-container {
    width: 100%;
    max-width: 300px;
    margin-bottom: 12px;
}

.fk-portion-bar {
    display: flex;
    width: 100%;
    height: 64px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
}

.fk-portion-segment {
    flex: 1;
    position: relative;
    transition: background 300ms ease;
}
.fk-portion-segment:not(:last-child) {
    border-right: 2px solid rgba(255,255,255,0.12);
}
.fk-portion-segment.filled {
    background: linear-gradient(180deg, #ff9f43, #ff6b6b);
}
.fk-portion-segment.empty {
    background: rgba(255,255,255,0.04);
}

/* Segment label inside each portion */
.fk-segment-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    pointer-events: none;
}
.fk-portion-segment.filled .fk-segment-label {
    color: rgba(255,255,255,0.8);
}

/* Fraction label beneath the bar */
.fk-fraction-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-align: center;
    margin-bottom: 24px;
    min-height: 20px;
}

/* Answer buttons */
.fk-answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    max-width: 320px;
}

.fk-answer-btn {
    padding: 18px 12px;
    border-radius: 16px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    cursor: pointer;
    transition: all 150ms;
    font-family: inherit;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    line-height: 1.2;
}
.fk-answer-btn:active {
    transform: scale(0.95);
}
.fk-answer-btn.correct {
    background: rgba(46, 213, 115, 0.3);
    border-color: #2ed573;
    color: #2ed573;
    animation: fk-pop 300ms ease;
}
.fk-answer-btn.wrong {
    background: rgba(255, 71, 87, 0.3);
    border-color: #ff4757;
    color: #ff4757;
    animation: fk-shake 300ms ease;
}

@keyframes fk-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
@keyframes fk-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Feedback overlay text */
.fk-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: 800;
    pointer-events: none;
    opacity: 0;
    transition: all 300ms ease;
}
.fk-feedback.show {
    opacity: 1;
    animation: fk-float-up 600ms ease forwards;
}
@keyframes fk-float-up {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    30% { transform: translate(-50%, -60%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -100%) scale(1); opacity: 0; }
}

/* Game over stats */
.fk-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}
.fk-stat-box {
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
}
.fk-stat-num {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
}
.fk-stat-lbl {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.35);
    margin-top: 2px;
}

/* Mixed number styling */
.fk-mixed {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.fk-whole {
    font-size: inherit;
}
.fk-frac {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-size: 0.6em;
}
.fk-frac-num {
    border-bottom: 2px solid currentColor;
    padding-bottom: 1px;
    min-width: 16px;
    text-align: center;
}
.fk-frac-den {
    padding-top: 1px;
    min-width: 16px;
    text-align: center;
}

/* Help modal tweaks */
.help-section {
    margin-bottom: 16px;
}
.help-section h4 {
    font-size: 14px;
    font-weight: 700;
    color: #ff9f43;
    margin-bottom: 4px;
}
.help-section p {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}

/* Comparison mode styling */
.fk-compare-container {
    display: flex;
    gap: 16px;
    align-items: center;
    width: 100%;
    max-width: 300px;
    margin-bottom: 12px;
}
.fk-compare-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.fk-compare-side .fk-portion-bar {
    height: 48px;
}
.fk-compare-label {
    font-size: 18px;
    font-weight: 800;
    color: rgba(255,255,255,0.8);
}
.fk-compare-vs {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
}
