/* ===== STOCK MARKET REEL STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* COLOR PALETTE */
:root {
    --sm-bg: #0B1220;
    --sm-primary: #00FF88;
    --sm-secondary: #4FD1FF;
    --sm-white: #FFFFFF;
    --sm-muted: #A0AEC0;
    --sm-danger: #FF6B6B;
    --sm-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* OVERLAY MODE */
#reelOverlay.stock-market-mode {
    background: var(--sm-bg);
}

#reelOverlay.stock-market-mode .reel-container {
    background: var(--sm-bg);
    border: none;
    box-shadow: none;
}

/* PROGRESS BAR */
.stock-market-mode .reel-progress {
    background: rgba(255, 255, 255, 0.1);
    height: 3px;
}

.stock-market-mode .progress-bar {
    background: var(--sm-primary);
    box-shadow: 0 0 10px var(--sm-primary);
}

/* HIDE DEFAULT ACTIONS IN STOCK MODE */
.stock-market-mode .reel-actions,
.stock-market-mode .sound-toggle {
    display: none;
}

/* ===== SCENE BASE ===== */
.sm-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(--sm-font);
}

.sm-scene.active {
    opacity: 1;
    visibility: visible;
}

/* ===== TEXT STYLES ===== */
.sm-text {
    color: var(--sm-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);
}

.sm-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.sm-title-bold {
    font-size: 26px;
    font-weight: 700;
}

.sm-text-regular {
    font-size: 18px;
    font-weight: 400;
}

.sm-text-muted {
    font-size: 14px;
    color: var(--sm-muted);
}

.sm-accent {
    color: var(--sm-primary);
    font-weight: 600;
}

.sm-accent-cyan {
    color: var(--sm-secondary);
    font-weight: 600;
}

.sm-accent-red {
    color: var(--sm-danger);
    font-weight: 600;
}

/* ===== SCENE 1: HOOK ===== */
.sm-hook-container {
    width: 100%;
    height: 200px;
    position: relative;
    margin-bottom: 30px;
    overflow: hidden;
}

.sm-grid-bg {
    position: absolute;
    inset: -100%;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    transform: perspective(400px) rotateX(60deg);
    animation: gridMove 15s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: perspective(400px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(400px) rotateX(60deg) translateY(30px);
    }
}

.sm-glowing-line {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px var(--sm-primary));
}

.sm-line-path {
    fill: none;
    stroke: var(--sm-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 2s ease-out;
}

.sm-underline {
    display: block;
    width: 0;
    height: 3px;
    background: var(--sm-primary);
    margin: 12px auto 0;
    border-radius: 2px;
    transition: width 0.8s ease-out 0.3s;
}

/* ===== SCENE 2: CITY ===== */
.sm-city-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 200px;
    margin-bottom: 30px;
    transform-style: preserve-3d;
    transform: rotateX(-10deg) rotateY(10deg);
}

.sm-building {
    width: 35px;
    height: 0;
    opacity: 0;
    background: linear-gradient(180deg,
            rgba(0, 255, 136, 0.3) 0%,
            rgba(0, 255, 136, 0.1) 100%);
    border: 1px solid rgba(0, 255, 136, 0.4);
    border-bottom: none;
    position: relative;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px 4px 0 0;
}

.sm-building::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* ===== SCENE 3: CUBE ===== */
.sm-cube-wrapper {
    margin-bottom: 30px;
}

.sm-big-cube {
    width: 120px;
    height: 120px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    background: rgba(79, 209, 255, 0.1);
    border: 1px solid rgba(79, 209, 255, 0.3);
    border-radius: 8px;
}

.sm-cube-piece {
    background: rgba(79, 209, 255, 0.25);
    border: 1px solid rgba(79, 209, 255, 0.5);
    border-radius: 4px;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: var(--sm-secondary);
    font-weight: 600;
}

.sm-cube-piece::after {
    content: attr(data-label);
}

/* ===== SCENE 4: GROWTH ===== */
.sm-growth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.sm-price-tag {
    font-size: 42px;
    font-weight: 700;
    color: var(--sm-primary);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    margin-bottom: 15px;
    font-family: var(--sm-font);
}

.sm-price-bar-wrapper {
    width: 80px;
    height: 160px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    padding: 4px;
    overflow: hidden;
}

.sm-price-bar {
    width: 100%;
    height: 0;
    background: linear-gradient(to top,
            rgba(0, 255, 136, 0.8),
            rgba(0, 255, 136, 0.3));
    border-radius: 4px;
    transition: height 2.5s ease-out;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

/* ===== SCENE 5: SPLIT SCREEN ===== */
.sm-split-screen {
    display: flex;
    width: 100%;
    gap: 15px;
    margin-bottom: 30px;
    padding: 0 10px;
}

.sm-graph-panel {
    flex: 1;
    height: 150px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sm-graph-up {
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.sm-graph-down {
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.sm-mini-chart {
    width: 80%;
    height: 80%;
}

.sm-chart-line-up {
    fill: none;
    stroke: var(--sm-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.5s ease-out;
    filter: drop-shadow(0 0 5px var(--sm-primary));
}

.sm-chart-line-down {
    fill: none;
    stroke: var(--sm-danger);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.5s ease-out;
    filter: drop-shadow(0 0 5px var(--sm-danger));
}

.sm-panel-label {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 24px;
}

/* ===== SCENE 6: CLOSING ===== */
.sm-final-graph {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 140px;
    margin-bottom: 30px;
}

.sm-final-bar {
    width: 20px;
    height: 0;
    border-radius: 4px 4px 0 0;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sm-final-bar:nth-child(1) {
    background: var(--sm-primary);
}

.sm-final-bar:nth-child(2) {
    background: var(--sm-secondary);
}

.sm-final-bar:nth-child(3) {
    background: var(--sm-primary);
}

.sm-final-bar:nth-child(4) {
    background: var(--sm-muted);
}

.sm-final-bar:nth-child(5) {
    background: var(--sm-primary);
}

/* CTA BUTTON */
.sm-cta-btn {
    margin-top: 25px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--sm-primary), #00CC6A);
    border: none;
    border-radius: 50px;
    color: #0B1220;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--sm-font);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
}

.sm-cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(0, 255, 136, 0.5);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 400px) {
    .sm-title-bold {
        font-size: 22px;
    }

    .sm-text-regular {
        font-size: 16px;
    }

    .sm-price-tag {
        font-size: 36px;
    }
}