/* ========================================================
   DUOLINGO x MINECRAFT VOXEL STREAK CELEBRATION STYLES
   Extracted for shared use across account.html & dts.html (dreamstimeskip)
   ======================================================== */

.mc-pixel-font {
    font-family: 'Silkscreen', 'Press Start 2P', monospace;
    letter-spacing: 0.5px;
}

/* Minecraft Button Base */
.mc-button {
    font-family: 'Silkscreen', 'Press Start 2P', monospace;
    padding: 12px 22px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
    border: 3px solid #000;
    box-sizing: border-box;
}

.mc-item-icon-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    image-rendering: pixelated;
}

@keyframes mcFlameFlicker {
    0% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.7)); }
    100% { transform: scale(1.1) translateY(-1px); filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.95)); }
}

.mc-flare-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: fadeInFlare 0.3s ease-out;
}

@keyframes fadeInFlare {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Layer 1: Base Obsidian/Nether Canvas with pixelated grid texture */
.mc-flare-backdrop {
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0px, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 16px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0px, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 16px),
        radial-gradient(circle at 50% 40%, #24130E 0%, #17101C 60%, #0A080D 100%);
    background-size: 16px 16px, 16px 16px, 100% 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mc-flare-overlay.soul-fire-theme .mc-flare-backdrop {
    background: 
        repeating-linear-gradient(0deg, rgba(0, 240, 255, 0.02) 0px, rgba(0, 240, 255, 0.02) 1px, transparent 1px, transparent 16px),
        repeating-linear-gradient(90deg, rgba(0, 240, 255, 0.02) 0px, rgba(0, 240, 255, 0.02) 1px, transparent 1px, transparent 16px),
        radial-gradient(circle at 50% 40%, #06283D 0%, #0B192C 60%, #050B14 100%);
    background-size: 16px 16px, 16px 16px, 100% 100%;
}

/* Layer 2: Dynamic Radial Heat Bloom */
.mc-flare-heat-bloom {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 480px;
    height: 480px;
    margin-top: -240px;
    margin-left: -240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 106, 0, 0.28) 0%, rgba(255, 60, 0, 0.12) 45%, transparent 70%);
    pointer-events: none;
    transform-origin: center center;
    transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mc-flare-overlay.soul-fire-theme .mc-flare-heat-bloom {
    background: radial-gradient(circle, rgba(0, 240, 255, 0.28) 0%, rgba(0, 160, 255, 0.12) 45%, transparent 70%);
}

.mc-flare-heat-bloom.bloom-idle {
    animation: heatBloomBreathe 4s ease-in-out infinite;
}

@keyframes heatBloomBreathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.18); opacity: 1; }
}

.mc-flare-heat-bloom.bloom-burst {
    transform: scale(2.5) !important;
    opacity: 1 !important;
}

/* Layer 3: Rotating Pixel Sunburst / God-Rays (Disabled per user request) */
.mc-flare-rays {
    display: none !important;
}

/* Layer 4: Voxel Particle Canvas */
.mc-celebration-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Expanding Square Pixel Shockwave Ring */
.mc-shockwave-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    margin-top: -70px;
    margin-left: -70px;
    border: 4px solid #FFAA00;
    box-shadow: 0 0 16px #FF6A00, inset 0 0 16px #FF6A00;
    pointer-events: none;
    border-radius: 2px;
    opacity: 0;
    z-index: 8;
}

.mc-flare-overlay.soul-fire-theme .mc-shockwave-ring {
    border-color: #00F0FF;
    box-shadow: 0 0 16px #00838F, inset 0 0 16px #00838F;
}

.mc-shockwave-ring.trigger-burst {
    animation: squareShockwave 0.45s ease-out forwards;
}

@keyframes squareShockwave {
    0% { transform: scale(0.2); opacity: 1; }
    100% { transform: scale(2.6); opacity: 0; }
}

/* Camera Shake */
.mc-flare-overlay.streak-camera-shake .mc-flare-card {
    animation: cameraShakeJitter 0.18s linear;
}

@keyframes cameraShakeJitter {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-4px, 3px); }
    40% { transform: translate(4px, -3px); }
    60% { transform: translate(-3px, -2px); }
    80% { transform: translate(2px, 2px); }
    100% { transform: translate(0, 0); }
}

/* Stage Card (3D Beveled Minecraft Dark-Stone) */
.mc-flare-card {
    position: relative;
    z-index: 10;
    background: #141118;
    border: 4px solid #141218;
    box-shadow: 
        inset 3px 3px 0 #3d3546, 
        inset -3px -3px 0 #070609, 
        0 20px 60px rgba(0, 0, 0, 0.95);
    border-radius: 4px;
    padding: 26px 22px;
    text-align: center;
    max-width: 480px;
    width: 92%;
    box-sizing: border-box;
    overflow: hidden;
    animation: popFlareCard 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mc-flare-overlay.soul-fire-theme .mc-flare-card {
    border-color: #0b1f29;
    box-shadow: 
        inset 3px 3px 0 #1b4d63, 
        inset -3px -3px 0 #040d12, 
        0 20px 60px rgba(0, 0, 0, 0.95), 
        0 0 35px rgba(0, 240, 255, 0.25);
}

@keyframes popFlareCard {
    from { transform: scale(0.7) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Modal Sound Toggle Button */
.modal-sound-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
}

/* Voxel Flame Emblem Container & Choreography */
.flare-voxel-flame-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 110px;
    margin-bottom: 8px;
    position: relative;
    z-index: 12;
    transform-origin: center bottom;
}

.flare-voxel-flame-container.anticipation-squash {
    transform: scale(1.18, 0.78) translateY(8px);
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.flare-voxel-flame-container.ignite-spring {
    animation: flameOvershootSpring 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes flameOvershootSpring {
    0% { transform: scale(1.18, 0.78) translateY(8px); }
    60% { transform: scale(1.32, 1.32) translateY(-10px); }
    100% { transform: scale(1) translateY(0); }
}

.flare-voxel-flame-container.living-idle {
    animation: flameIdleFloat 2.4s ease-in-out infinite alternate;
}

@keyframes flameIdleFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

/* Stepped Pixel Flame SVG */
.mc-voxel-flame-svg {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    shape-rendering: crispEdges;
    filter: drop-shadow(0 4px 12px rgba(255, 106, 0, 0.7));
}

.mc-voxel-flame-svg.soulfire {
    filter: drop-shadow(0 4px 12px rgba(0, 240, 255, 0.7));
}

.mc-voxel-flame-svg.dormant {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
    opacity: 0.85;
}

.mc-voxel-flame-svg.ignited .flame-spark,
.mc-voxel-flame-svg.soulfire .flame-spark {
    animation: sparkSteppedFlicker 0.4s steps(1, end) infinite;
}

@keyframes sparkSteppedFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Odometer Streak Counter Roll */
.flare-streak-odometer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    position: relative;
    z-index: 12;
}

.odometer-window {
    height: 3.6rem;
    overflow: hidden;
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.odometer-digit {
    font-family: 'Silkscreen', 'Press Start 2P', monospace;
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1;
    color: #FFAA00;
    text-shadow: 0 4px 0 #3A1D00, 0 0 25px rgba(255, 170, 0, 0.5);
    display: inline-block;
}

.mc-flare-overlay.soul-fire-theme .odometer-digit {
    color: #00F0FF;
    text-shadow: 0 4px 0 #00363A, 0 0 25px rgba(0, 240, 255, 0.5);
}

.odometer-digit.digit-prev.roll-up-out {
    transform: translateY(-110%) scale(0.8);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

.odometer-digit.digit-next.prepare-bottom {
    position: absolute;
    transform: translateY(110%);
    opacity: 0;
}

.odometer-digit.digit-next.roll-up-in {
    position: absolute;
    animation: digitRocketUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes digitRocketUp {
    0% { transform: translateY(110%) scale(1.4); opacity: 0; }
    70% { transform: translateY(-6%) scale(1.08); opacity: 1; }
    100% { transform: translateY(0%) scale(1); opacity: 1; }
}

.flare-streak-odometer-container.shine-sweep .odometer-digit {
    background: linear-gradient(105deg, #FFAA00 0%, #FFF6D6 50%, #FFAA00 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShineSweep 0.9s ease-out forwards;
}

.mc-flare-overlay.soul-fire-theme .flare-streak-odometer-container.shine-sweep .odometer-digit {
    background: linear-gradient(105deg, #00F0FF 0%, #E0F7FA 50%, #00F0FF 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShineSweep 0.9s ease-out forwards;
}

@keyframes goldShineSweep {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.flare-days-label {
    font-family: 'Silkscreen', monospace;
    font-size: 1.15rem;
    color: #ffff55;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 #000;
}

/* 7-Day Minecraft Hotbar (Inventory Slots) */
.mc-weekly-hotbar {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 14px 0;
    user-select: none;
}

.mc-hotbar-slot {
    width: 46px;
    height: 56px;
    background: #181920;
    border: 2px solid #000;
    box-shadow: inset 2px 2px 0 #282a36, inset -2px -2px 0 #0d0e12;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px;
    position: relative;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.mc-hotbar-slot.claimed {
    border-color: #854D0E;
    background: #231B12;
    box-shadow: inset 2px 2px 0 #522E07, inset -2px -2px 0 #181007;
}

.mc-hotbar-slot.pending-today {
    border-color: #55FFFF;
    animation: slotPendingPulse 1.6s ease-in-out infinite alternate;
}

@keyframes slotPendingPulse {
    0% { box-shadow: inset 2px 2px 0 #00AAAA, inset -2px -2px 0 #005555, 0 0 4px rgba(85, 255, 255, 0.4); }
    100% { box-shadow: inset 2px 2px 0 #55FFFF, inset -2px -2px 0 #008282, 0 0 12px rgba(85, 255, 255, 0.8); }
}

.mc-hotbar-slot.today.slam-lock {
    border: 2px solid #FFD700 !important;
    background: #2A200A !important;
    animation: slotSlamIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes slotSlamIn {
    0% { transform: scale(1.6); box-shadow: 0 0 25px #FFD700; }
    70% { transform: scale(0.92); }
    100% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
}

.slot-day-label {
    font-family: 'Silkscreen', monospace;
    font-size: 0.62rem;
    color: #9CA3AF;
    letter-spacing: 0.5px;
}

.slot-date-num {
    font-family: 'Silkscreen', monospace;
    font-size: 0.52rem;
    color: #6B7280;
    margin-top: -2px;
    line-height: 1;
}

.mc-hotbar-slot.today .slot-date-num {
    color: #FFFF55;
    font-weight: bold;
}

.mc-hotbar-slot.claimed .slot-date-num {
    color: #D1D5DB;
}

.slot-socket {
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-mini-flame {
    font-size: 1rem;
    line-height: 1;
}

.slot-mini-flame.dormant {
    filter: grayscale(100%) opacity(0.35);
}

.slot-mini-flame.today-ignited {
    filter: drop-shadow(0 0 4px #FFAA00);
    animation: mcFlameFlicker 1.2s infinite alternate ease-in-out;
}

.slot-check {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 0.6rem;
    color: #55FF55;
    font-weight: 900;
}

.slot-lock {
    font-size: 0.68rem;
    opacity: 0.4;
}

.slot-today-indicator {
    position: absolute;
    top: -10px;
    font-family: 'Silkscreen', monospace;
    font-size: 0.45rem;
    color: #FFFF55;
    background: #000;
    padding: 1px 3px;
    border-radius: 2px;
    border: 1px solid #FFFF55;
}

/* Reward Details Card */
.flare-reward-card {
    background: #0D0F14;
    border: 2px solid #232834;
    box-shadow: inset 2px 2px 0 #1b1e27, inset -2px -2px 0 #3a4152;
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.mc-flare-rarity-pill {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 4px;
    font-family: 'Silkscreen', monospace;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-transform: uppercase;
    background: rgba(85, 255, 255, 0.2);
    color: #55ffff;
    border: 1px solid #55ffff;
    box-shadow: 0 0 12px rgba(85, 255, 255, 0.4);
}

.mc-flare-rarity-pill.rare {
    background: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
    border-color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.45);
}

.mc-flare-rarity-pill.legendary {
    background: rgba(234, 179, 8, 0.25);
    color: #facc15;
    border-color: #eab308;
    box-shadow: 0 0 14px rgba(234, 179, 8, 0.5);
}

.mc-flare-rarity-pill.mythic {
    background: rgba(147, 51, 234, 0.25);
    color: #c084fc;
    border-color: #9333ea;
    box-shadow: 0 0 14px rgba(147, 51, 234, 0.5);
}

.mc-flare-rarity-pill.grand,
.mc-flare-rarity-pill.elytra {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.3), rgba(168, 85, 247, 0.3));
    color: #ffd700;
    border-color: #ffd700;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.6);
}

.mc-flare-icon-container {
    width: 68px;
    height: 68px;
    margin: 0 auto 12px;
    background: #111317;
    border: 3px solid #383e4c;
    box-shadow: inset 2px 2px 0 #525a69, inset -2px -2px 0 #090a0d, 0 0 25px rgba(85, 255, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatIcon 2.5s ease-in-out infinite;
}

.mc-flare-icon-container img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.7));
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.mc-flare-item-name {
    margin: 0 0 6px 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.mc-flare-points-bonus {
    color: #55ff55;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 8px 0;
    text-shadow: 0 0 8px rgba(85, 255, 85, 0.5);
}

.mc-flare-desc {
    color: #9ca3af;
    font-size: 0.85rem;
    line-height: 1.45;
    margin: 0;
}

/* Stage 5: Celebratory Banner */
.flare-celebration-banner {
    font-family: 'Silkscreen', monospace;
    font-size: 0.88rem;
    line-height: 1.4;
    color: #55FF55;
    text-shadow: 1px 1px 0 #003300, 0 0 12px rgba(85, 255, 85, 0.6);
    margin: 8px 0 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.flare-celebration-banner.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Actions Row & Tactile 3D Buttons */
.flare-actions-row {
    display: flex;
    gap: 10px;
    flex-direction: column;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.flare-actions-row.visible {
    opacity: 1;
    transform: translateY(0);
}

.mc-button-collect,
.mc-pixel-btn-claim {
    background: #3c8527 !important;
    border-color: #000000 !important;
    border-bottom: 6px solid #1c5212 !important;
    color: #fff !important;
    width: 100%;
    padding: 13px 18px !important;
    font-size: 0.98rem !important;
    box-shadow: inset 2px 2px 0 #5eb33a, inset -2px -2px 0 #1c5212, 0 4px 0 #000000 !important;
    cursor: pointer;
    transition: background 0.1s ease;
}

.mc-button-collect:hover,
.mc-pixel-btn-claim:hover:not(:disabled) {
    background: #499e30 !important;
}

.mc-button-collect:active,
.mc-pixel-btn-claim:active:not(:disabled) {
    border-bottom-width: 2px !important;
    transform: translateY(4px) !important;
    box-shadow: inset -2px -2px 0 #5eb33a, inset 2px 2px 0 #1c5212, 0 2px 0 #000000 !important;
}

.mc-button-replay,
.mc-pixel-btn-replay,
.mc-sound-toggle-btn,
.modal-sound-toggle {
    display: none !important;
}

/* Responsive Scaling */
@media (max-width: 480px) {
    .mc-flare-card {
        padding: 20px 14px;
        max-width: 95%;
    }

    .mc-weekly-hotbar {
        gap: 4px;
    }

    .mc-hotbar-slot {
        width: 38px;
        height: 50px;
        padding: 3px 1px;
    }

    .slot-day-label {
        font-size: 0.52rem;
    }

    .odometer-digit {
        font-size: 2.6rem;
    }

    .odometer-window {
        height: 3rem;
    }
}

/* Reduced Motion Mode */
@media (prefers-reduced-motion: reduce) {
    .mc-flare-card,
    .flare-voxel-flame-container,
    .mc-shockwave-ring,
    .mc-flare-rays,
    .mc-flare-heat-bloom {
        animation: none !important;
        transition: none !important;
    }

    .mc-flare-overlay.streak-camera-shake .mc-flare-card {
        animation: none !important;
    }

    .odometer-digit.digit-prev.roll-up-out {
        opacity: 0;
        transform: none;
    }

    .odometer-digit.digit-next.roll-up-in {
        opacity: 1;
        transform: none;
        animation: none;
    }
}
