* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --strawberry: #E63946;
    --cream: #F1FAEE;
    --golden: #F4A261;
    --navy: #1D3557;
    --teal: #2A9D8F;
    --dark-red: #9B2335;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--cream);
    color: var(--navy);
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    position: relative;
    min-height: 100vh;
}

/* Background Effects */
.sunburst-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-conic-gradient(
            from 0deg at 50% 0%,
            var(--cream) 0deg 10deg,
            #E8D5B7 10deg 20deg
        );
    opacity: 0.3;
    z-index: -2;
}

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

/* Bridge */
.bridge-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    overflow: hidden;
    z-index: -1;
    opacity: 0.15;
}

.bridge-silhouette {
    width: 100%;
    height: 100%;
    background: var(--navy);
    clip-path: polygon(
        0% 100%, 0% 80%, 5% 80%, 5% 40%, 8% 40%, 8% 30%, 10% 20%, 12% 30%, 12% 40%, 15% 40%, 
        20% 60%, 25% 60%, 30% 40%, 35% 40%, 35% 30%, 37% 20%, 39% 30%, 39% 40%, 42% 40%, 42% 80%,
        58% 80%, 58% 40%, 61% 40%, 61% 30%, 63% 20%, 65% 30%, 65% 40%, 70% 40%, 75% 60%, 80% 60%,
        85% 40%, 88% 40%, 88% 30%, 90% 20%, 92% 30%, 92% 40%, 95% 40%, 95% 80%, 100% 80%, 100% 100%
    );
    animation: bridgeSway 8s ease-in-out infinite;
}

@keyframes bridgeSway {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* Header */
.app-header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    position: relative;
}

.header-badge {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.main-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    color: var(--strawberry);
    text-shadow: 3px 3px 0 var(--navy), 6px 6px 0 rgba(0,0,0,0.1);
    letter-spacing: 0.05em;
    line-height: 1;
}

.subtitle {
    font-family: 'Special Elite', monospace;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--navy);
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr 1.5fr 1fr;
    }
}

.column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: var(--navy);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    text-align: center;
}

/* Cards */
.fomo-meter-container,
.countdown-container,
.prizes-container,
.idea-generator,
.fortune-container,
.vibes-container,
.sf-panel,
.era-stats {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(29, 53, 87, 0.1);
    border: 2px solid var(--navy);
}

/* FOMO Meter */
.fomo-meter {
    position: relative;
    width: 200px;
    height: 100px;
    margin: 0 auto 1rem;
    cursor: pointer;
}

.meter-arc {
    position: absolute;
    width: 200px;
    height: 100px;
    background: conic-gradient(
        from 180deg at 50% 100%,
        var(--teal) 0deg,
        var(--golden) 90deg,
        var(--strawberry) 180deg
    );
    border-radius: 100px 100px 0 0;
}

.meter-labels {
    position: absolute;
    width: 100%;
    top: 80%;
    display: flex;
    justify-content: space-between;
    padding: 0 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.meter-needle {
    position: absolute;
    width: 6px;
    height: 80px;
    background: var(--navy);
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    transform-origin: bottom center;
    border-radius: 3px;
    transition: transform 0.3s ease;
    z-index: 2;
}

.meter-center {
    position: absolute;
    width: 30px;
    height: 30px;
    background: white;
    border: 3px solid var(--navy);
    border-radius: 50%;
    bottom: -15px;
    left: 50%;
    margin-left: -15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 3;
}

.fomo-status {
    text-align: center;
}

.fomo-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.05em;
}

.fomo-message {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Countdown */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.time-block {
    background: var(--navy);
    color: white;
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    text-align: center;
}

.time-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    line-height: 1;
}

.time-label {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.countdown-subtitle {
    text-align: center;
    font-style: italic;
    opacity: 0.7;
}

/* Prizes */
.prizes-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.prize-card {
    background: linear-gradient(135deg, var(--golden) 0%, #E9C46A 100%);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    min-width: 80px;
    animation: float 3s ease-in-out infinite;
    border: 2px solid var(--navy);
}

.prize-card:nth-child(2) { animation-delay: 0.5s; }
.prize-card:nth-child(3) { animation-delay: 1s; }

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

.prize-emoji {
    font-size: 1.5rem;
}

.prize-place {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.prize-amount {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--navy);
}

.prizes-subtitle {
    text-align: center;
    margin-top: 1rem;
    font-style: italic;
}

/* Idea Generator */
.generate-btn {
    background: linear-gradient(135deg, var(--strawberry) 0%, var(--dark-red) 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.generate-btn.generating {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.idea-result {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--cream);
    border-radius: 8px;
    border-left: 4px solid var(--strawberry);
}

.idea-text {
    font-family: 'Special Elite', monospace;
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tweet-btn {
    background: #1DA1F2;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.tweet-btn:hover {
    opacity: 0.9;
}

/* Fortune Cookie */
.fortune-cookie {
    font-size: 4rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.fortune-cookie:hover {
    transform: scale(1.1);
}

.fortune-cookie.opening {
    animation: cookieShake 0.5s ease-in-out;
}

@keyframes cookieShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.fortune-hint {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 0.5rem;
}

.fortune-text {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--golden);
    border-radius: 8px;
    text-align: center;
    font-family: 'Special Elite', monospace;
}

/* Virtual Vibes */
.vibe-btn {
    background: linear-gradient(135deg, var(--teal) 0%, #238B7C 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
}

.vibe-btn:hover {
    transform: scale(1.02);
}

.vibe-btn:active {
    transform: scale(0.98);
}

.vibe-counter {
    text-align: center;
    margin-top: 1rem;
}

.vibe-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--strawberry);
}

.vibe-label {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* SF Panel */
.sf-time {
    text-align: center;
    padding: 1rem;
    background: var(--navy);
    color: white;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.sf-time-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
}

.sf-time-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
}

.distance-calc {
    display: flex;
    gap: 0.5rem;
}

.city-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--navy);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
}

.calc-btn {
    padding: 0.75rem 1rem;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.distance-result {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
}

.distance-result .highlight {
    color: var(--strawberry);
}

/* Era Stats */
.era-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem;
    background: var(--cream);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.era-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.era-year {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: var(--strawberry);
    min-width: 50px;
}

.era-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Floating Strawberry */
.floating-strawberry {
    position: fixed;
    font-size: 2rem;
    z-index: 100;
    pointer-events: none;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2rem;
    background: var(--navy);
    color: white;
}

.footer-link {
    color: var(--golden);
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-tagline {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    margin: 0.5rem 0;
    color: var(--strawberry);
}

.footer-small {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 0.5rem;
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .app-header {
        padding: 2rem 1rem 1.5rem;
    }
    
    .header-badge {
        font-size: 3rem;
    }
    
    .fomo-meter-container,
    .countdown-container,
    .prizes-container,
    .idea-generator,
    .fortune-container,
    .vibes-container,
    .sf-panel,
    .era-stats {
        padding: 1rem;
    }
    
    .time-value {
        font-size: 1.5rem;
    }
    
    .prize-card {
        min-width: 70px;
        padding: 0.75rem;
    }
}