/* =============================================
   FISHING.CSS — Gone Fishing game styles
   Sofia's Game Arcade
   ============================================= */

body {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Back nav handled by base.css */

/* ---- Game container ---- */
.game-container {
    text-align: center;
    padding: var(--space-xl);
    max-width: 500px;
    width: 100%;
}

/* ---- Screen transitions ---- */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(14px);
}

.screen.active {
    display: block;
    animation: screenIn 0.4s ease forwards;
}

@keyframes screenIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Title screen ---- */
.title {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: var(--space-xs);
    background: linear-gradient(135deg, var(--accent-blue), #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.credit {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.intro-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.setup-label {
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
}

.tables-picker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.table-btn {
    width: 60px;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-subtle);
    background: transparent;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color var(--transition-fast),
                background var(--transition-fast),
                transform var(--transition-fast);
}

.table-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(96, 165, 250, 0.1);
    transform: scale(1.08);
}

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

.table-btn.active {
    border-color: var(--accent-blue);
    background: rgba(96, 165, 250, 0.15);
    color: var(--accent-blue);
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.9rem 2.4rem;
    border-radius: var(--radius-full);
    border: none;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition-fast),
                box-shadow var(--transition-fast);
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
}

.btn:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: scale(0.97);
}

.btn-start {
    background: var(--accent-blue);
    color: #fff;
    padding: 1rem 3rem;
    font-size: 1.3rem;
    animation: pulseGlow 2.5s ease-in-out infinite;
}

.btn-start:hover {
    background: #38bdf8;
    animation: none;
    box-shadow: 0 0 24px rgba(96, 165, 250, 0.4);
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(96, 165, 250, 0.2); }
    50%      { box-shadow: 0 0 24px rgba(96, 165, 250, 0.45); }
}

.btn-reel {
    background: var(--accent-blue);
    color: #fff;
    padding: 0.7rem 1.8rem;
    font-size: 1.1rem;
    animation: none;
}

.btn-reel:hover {
    background: #38bdf8;
    box-shadow: 0 0 16px rgba(96, 165, 250, 0.3);
}

.btn-reel:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---- Stats bar ---- */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-md);
    color: var(--text-muted);
    font-size: 1rem;
}

.stats-bar strong {
    color: var(--text-primary);
}

/* ---- Pond / fishing scene ---- */
.pond {
    position: relative;
    width: 280px;
    height: 200px;
    margin: 0 auto var(--space-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: linear-gradient(180deg, #1a2740 0%, #1a2740 40%, #0c4a6e 40%, #0e6ba8 100%);
}

/* Rod */
.rod {
    position: absolute;
    top: 0;
    right: 60px;
    width: 3px;
    height: 70px;
    background: linear-gradient(180deg, #8B5E3C, #6B4226);
    transform: rotate(20deg);
    transform-origin: top center;
    border-radius: 2px;
}

/* Fishing line */
.line {
    position: absolute;
    top: 62px;
    right: 50px;
    width: 1px;
    background: rgba(255, 255, 255, 0.4);
    transition: height 0.5s ease;
}

.line-deep { height: 110px; }
.line-mid  { height: 80px; }
.line-up   { height: 45px; }

/* Water surface */
.water {
    position: absolute;
    top: 40%;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.wave {
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        rgba(56, 189, 248, 0.3) 20px,
        transparent 40px
    );
    animation: waveMove 3s linear infinite;
}

@keyframes waveMove {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-40px); }
}

/* Fish */
.fish {
    position: absolute;
    right: 42px;
    font-size: 2rem;
    transition: all 0.5s ease;
}

.fish-deep {
    bottom: 20px;
    opacity: 0.5;
}

.fish-mid {
    bottom: 60px;
    opacity: 0.75;
}

.fish-up {
    bottom: 110px;
    opacity: 1;
    font-size: 2.4rem;
}

/* Pull progress dots */
.hook-area {
    position: absolute;
    top: 8px;
    left: 12px;
}

.pull-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: all var(--transition-fast);
}

.dot-correct {
    background: var(--accent-green);
    border-color: var(--accent-green);
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

.dot-wrong {
    background: var(--accent-red);
    border-color: var(--accent-red);
    box-shadow: 0 0 6px rgba(248, 113, 113, 0.4);
}

/* ---- Heads up screen ---- */
.headsup-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.headsup-text {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.headsup-text strong {
    color: var(--accent-blue);
}

/* ---- Timer bar ---- */
.question-timer {
    width: 100%;
    max-width: 280px;
    margin: 0 auto var(--space-sm);
}

.timer-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.timer-fill {
    height: 100%;
    width: 100%;
    background: var(--accent-blue);
    border-radius: 3px;
}

.timer-fill.timer-danger {
    background: var(--accent-red);
}

/* ---- Pull info ---- */
.pull-info {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

/* ---- Question area ---- */
.question-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.question-text {
    font-size: 1.8rem;
    font-weight: 800;
}

.answer-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.answer-input {
    width: 100px;
    padding: 0.7rem;
    background: transparent;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: border-color var(--transition-med);
    -moz-appearance: textfield;
}

.answer-input::-webkit-outer-spin-button,
.answer-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.answer-input:focus {
    border-color: var(--accent-blue);
}

.answer-input:disabled {
    opacity: 0.4;
}

/* ---- Round result screen ---- */
.result-icon {
    font-size: 4rem;
    margin-bottom: var(--space-sm);
}

.result-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
    animation: resultPop 0.5s ease;
}

.win-color  { color: var(--accent-green); }
.lose-color { color: var(--accent-red); }
.draw-color { color: var(--accent-yellow); }

@keyframes resultPop {
    0%   { opacity: 0; transform: scale(0.7); }
    70%  { transform: scale(1.06); }
    100% { opacity: 1; transform: scale(1); }
}

.result-msg {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: var(--space-xl);
}

/* ---- Final screen ---- */
.final-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
}

.final-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
    animation: resultPop 0.5s ease;
}

.final-stats {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

.final-stats strong {
    color: var(--text-primary);
}

/* ---- Responsive ---- */
@media (max-width: 420px) {
    .game-container {
        padding: 1.2rem;
    }

    .title {
        font-size: 1.8rem;
    }

    .pond {
        width: 240px;
        height: 170px;
    }

    .question-text {
        font-size: 1.5rem;
    }
}
