.popcorn-context .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.popcorn-context h1 {
    text-align: center;
    color: #E8C170;
    font-size: clamp(22px, 4vw, 32px);
    margin-bottom: 10px;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.8);
}

.popcorn-context .subtitle {
    text-align: center;
    color: #D4C5B0;
    font-size: clamp(14px, 2.5vw, 18px);
    margin-bottom: 30px;
}

.popcorn-context #popcorn-stage {
    background: linear-gradient(180deg, #1a0a00 0%, #000000 100%);
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

.popcorn-context .kernel {
    cursor: pointer;
}

.popcorn-context .kernel:hover .popped-corn {
    filter: brightness(1.2);
}

.popcorn-context .popped-corn {
    animation: float 3s ease-in-out infinite;
}

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

.popcorn-context .kernel-label {
    font-size: 14px;
    text-anchor: middle;
    pointer-events: none;
    font-family: "Press Start 2P", monospace;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.9);
}

.popcorn-context .popularity-bar {
    opacity: 0.3;
}

.popcorn-context .floor-line {
    stroke: #444;
    stroke-width: 3;
    stroke-dasharray: 10, 5;
}

.popcorn-context .controls {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.popcorn-context .control-btn {
    padding: 10px 20px;
    border: 2px solid #3E2723;
    background: #5C4033;
    color: #E8DCC4;
    border-radius: 8px;
    cursor: pointer;
    font-family: "Press Start 2P", monospace;
    font-size: 13px;
    transition: all 0.3s;
}

.popcorn-context .control-btn:hover {
    background: #704214;
    transform: translateY(-2px);
}

.popcorn-context .tooltip {
    position: absolute;
    padding: 12px;
    background: rgba(0, 0, 0, 0.95);
    color: #E8C170;
    border: 2px solid #E8C170;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    font-size: 13px;
    z-index: 1000;
    max-width: 200px;
    font-family: "Press Start 2P", monospace;
}

.popcorn-context .legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.popcorn-context .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #D4C5B0;
}

.popcorn-context .legend-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

/* Fortune Cookie Modal - Centers on Screen */
.fortune-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fortune-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.fortune-content {
    position: relative;
    width: 400px;
    height: 300px;
}

.cookie-half {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cookie-left {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.cookie-right {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.cookie-half.cracked-left {
    transform: translate(-150%, -50%) rotate(-45deg);
}

.cookie-half.cracked-right {
    transform: translate(50%, -50%) rotate(45deg);
}

.fortune-slip {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #FFF8DC;
    border: 3px solid #D4A574;
    border-radius: 8px;
    padding: 20px;
    min-width: 280px;
    max-width: 320px;
    opacity: 0;
    transition: opacity 0.5s ease 0.5s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.fortune-slip.visible {
    opacity: 1;
}

.fortune-slip h2 {
    font-size: 22px;
    color: #2a1510;
    margin: 0 0 8px 0;
    text-align: center;
    line-height: 1.4;
    word-wrap: break-word;
}

.fortune-slip .year {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 12px;
}

.fortune-slip .tagline {
    font-size: 16px;
    color: #8B7355;
    font-style: italic;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 12px;
    border-top: 2px solid #D4A574;
    padding-top: 12px;
}

.fortune-slip .icon {
    text-align: center;
    font-size: 48px;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .popcorn-context .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .popcorn-context .control-btn {
        width: 100%;
    }

    .fortune-content {
        width: 90%;
    }

    .fortune-slip {
        min-width: 240px;
        max-width: 280px;
    }
}