/* ===== SAVING STRATEGIES REEL STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* COLOR PALETTE */
:root {
    --sv-bg: #0B1220;
    --sv-primary: #00FF88;
    --sv-secondary: #4FD1FF;
    --sv-white: #FFFFFF;
    --sv-muted: #9CA3AF;
    --sv-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* OVERLAY MODE */
#reelOverlay.saving-mode {
    background: var(--sv-bg);
}

#reelOverlay.saving-mode .reel-container {
    background: var(--sv-bg);
    border: none;
    box-shadow: none;
}

/* PROGRESS BAR */
.saving-mode .reel-progress {
    background: rgba(255, 255, 255, 0.1);
    height: 3px;
}

.saving-mode .progress-bar {
    background: var(--sv-primary);
    box-shadow: 0 0 10px var(--sv-primary);
}

/* HIDE DEFAULT ACTIONS */
.saving-mode .reel-actions,
.saving-mode .sound-toggle {
    display: none;
}

/* ===== SCENE BASE ===== */
.sv-scene {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    font-family: var(--sv-font);
}

.sv-scene.active {
    opacity: 1;
    visibility: visible;
}

/* ===== TEXT STYLES ===== */
.sv-text {
    color: var(--sv-white);
    text-align: center;
    letter-spacing: 0.02em;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sv-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.sv-title-bold {
    font-size: 26px;
    font-weight: 700;
}

.sv-text-medium {
    font-size: 18px;
    font-weight: 500;
}

.sv-text-muted {
    font-size: 14px;
    color: var(--sv-muted);
}

.sv-accent {
    color: var(--sv-primary);
    font-weight: 600;
}

.sv-accent-blue {
    color: var(--sv-secondary);
    font-weight: 600;
}

/* ===== SCENE 1: HOOK - COINS ===== */
.sv-coins-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 30px;
}

.sv-grid-bg {
    position: absolute;
    inset: -150%;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 25px 25px;
    opacity: 0.5;
}

.sv-coin {
    position: absolute;
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #FFD700, #FFA500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow:
        0 4px 15px rgba(255, 215, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: translateY(-80px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.sv-coin.dropped {
    opacity: 1;
    transform: translateY(0);
}

.sv-coin:nth-child(2) {
    left: 30px;
    top: 40px;
    width: 45px;
    height: 45px;
}

.sv-coin:nth-child(3) {
    left: 100px;
    top: 20px;
    width: 55px;
    height: 55px;
}

.sv-coin:nth-child(4) {
    left: 140px;
    top: 70px;
    width: 40px;
    height: 40px;
}

.sv-coin:nth-child(5) {
    left: 70px;
    top: 100px;
    width: 48px;
    height: 48px;
}

.sv-underline {
    display: block;
    width: 0;
    height: 2px;
    background: var(--sv-primary);
    margin: 10px auto 0;
    transition: width 0.8s ease-out 0.3s;
}

/* ===== SCENE 2: PAY YOURSELF FIRST ===== */
.sv-income-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.sv-income-bar {
    width: 200px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sv-income-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--sv-white);
}

.sv-savings-portion {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--sv-primary);
    transition: width 1.5s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: #0B1220;
}

.sv-savings-box {
    width: 80px;
    height: 80px;
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid var(--sv-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease-out;
}

.sv-savings-box.visible {
    opacity: 1;
    transform: scale(1);
}

.sv-arrow {
    font-size: 24px;
    color: var(--sv-primary);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.5s ease-out;
}

.sv-arrow.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SCENE 3: AUTOMATE ===== */
.sv-automate-container {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.sv-calendar {
    width: 100px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

.sv-calendar-header {
    background: var(--sv-primary);
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: #0B1220;
}

.sv-calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 8px;
}

.sv-calendar-day {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    font-size: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sv-muted);
}

.sv-calendar-day.active {
    background: var(--sv-primary);
    color: #0B1220;
}

.sv-piggy-bank {
    width: 100px;
    height: 100px;
    background: linear-gradient(145deg, rgba(255, 182, 193, 0.3), rgba(255, 105, 180, 0.2));
    border-radius: 50% 50% 45% 45%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    border: 2px solid rgba(255, 182, 193, 0.4);
}

.sv-piggy-coin {
    position: absolute;
    top: -20px;
    font-size: 20px;
    opacity: 0;
    animation: dropCoin 0.6s ease-out forwards;
}

@keyframes dropCoin {
    0% {
        transform: translateY(-30px);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(15px);
        opacity: 0;
    }
}

/* ===== SCENE 4: SET A GOAL ===== */
.sv-goal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.sv-progress-ring {
    width: 150px;
    height: 150px;
    position: relative;
}

.sv-progress-ring svg {
    transform: rotate(-90deg);
}

.sv-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 10;
}

.sv-ring-fill {
    fill: none;
    stroke: var(--sv-secondary);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 408;
    stroke-dashoffset: 408;
    transition: stroke-dashoffset 2s ease-out;
    filter: drop-shadow(0 0 8px var(--sv-secondary));
}

.sv-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sv-ring-percent {
    font-size: 32px;
    font-weight: 700;
    color: var(--sv-secondary);
}

.sv-ring-label {
    font-size: 12px;
    color: var(--sv-muted);
}

.sv-target-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    opacity: 0;
    transition: all 0.5s ease-out;
}

.sv-target-icon.visible {
    opacity: 1;
}

/* ===== SCENE 5: EMERGENCY FUND ===== */
.sv-emergency-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sv-shield {
    width: 140px;
    height: 160px;
    background: linear-gradient(180deg, rgba(79, 209, 255, 0.2), rgba(79, 209, 255, 0.05));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 2px solid var(--sv-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.sv-shield.visible {
    opacity: 1;
    transform: scale(1);
}

.sv-shield-coins {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sv-shield-coin {
    width: 35px;
    height: 35px;
    background: linear-gradient(145deg, #FFD700, #FFA500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.sv-lock {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    background: var(--sv-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #0B1220;
    opacity: 0;
    transform: scale(0) rotate(-180deg);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
}

.sv-lock.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* ===== SCENE 6: CLOSING ===== */
.sv-final-graph {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    margin-bottom: 30px;
}

.sv-final-bar {
    width: 18px;
    height: 0;
    border-radius: 4px 4px 0 0;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sv-final-bar:nth-child(1) {
    background: rgba(0, 255, 136, 0.3);
}

.sv-final-bar:nth-child(2) {
    background: rgba(0, 255, 136, 0.5);
}

.sv-final-bar:nth-child(3) {
    background: rgba(0, 255, 136, 0.7);
}

.sv-final-bar:nth-child(4) {
    background: rgba(0, 255, 136, 0.85);
}

.sv-final-bar:nth-child(5) {
    background: var(--sv-primary);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

/* CTA BUTTON */
.sv-cta-btn {
    margin-top: 25px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--sv-primary), #00CC6A);
    border: none;
    border-radius: 50px;
    color: #0B1220;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--sv-font);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
}

.sv-cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(0, 255, 136, 0.5);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 400px) {
    .sv-title-bold {
        font-size: 22px;
    }

    .sv-text-medium {
        font-size: 16px;
    }
}