:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-tertiary: #1a1a3e;
    --banana: #FFD700;
    --banana-dim: #c4a400;
    --banana-glow: rgba(255, 215, 0, 0.15);
    --purple: #6c5ce7;
    --purple-dim: #4a3db5;
    --text-primary: #e8e6f0;
    --text-secondary: #9896a8;
    --danger: #ff6b6b;
    --success: #51cf66;
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

#root {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Mapbox overrides */
.mapboxgl-canvas-container {
    cursor: crosshair !important;
}

.mapboxgl-ctrl-attrib {
    display: none !important;
}

/* Banana pin marker */
.banana-marker {
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    animation: dropIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.banana-marker.faded {
    font-size: 18px;
    opacity: 0.5;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.banana-marker:hover {
    transform: scale(1.3);
}

@keyframes dropIn {
    0% { transform: translateY(-40px) scale(0.3); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Ripple effect */
.ripple-ring {
    position: absolute;
    border: 2px solid var(--banana);
    border-radius: 50%;
    animation: rippleOut 1.2s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleOut {
    0% { width: 0; height: 0; opacity: 0.8; }
    100% { width: 120px; height: 120px; opacity: 0; margin-left: -60px; margin-top: -60px; }
}

/* Pulsing banana */
@keyframes bananaPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.15) rotate(-5deg); }
    50% { transform: scale(1) rotate(0deg); }
    75% { transform: scale(1.15) rotate(5deg); }
}

.banana-pulse {
    display: inline-block;
    animation: bananaPulse 2s ease-in-out infinite;
}

/* Spinning banana loader */
@keyframes spinBanana {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.spin-banana {
    display: inline-block;
    font-size: 64px;
    animation: spinBanana 1.5s ease-in-out infinite;
}

/* Image hover zoom */
.generated-image {
    transition: transform 0.5s ease;
}

.generated-image:hover {
    transform: scale(1.02);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--purple-dim);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}

/* Panel resize handle */
.resize-handle {
    width: 6px;
    cursor: col-resize;
    background: linear-gradient(180deg, var(--bg-tertiary), var(--purple-dim), var(--bg-tertiary));
    transition: background 0.2s;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.resize-handle:hover, .resize-handle:active {
    background: linear-gradient(180deg, var(--banana-dim), var(--banana), var(--banana-dim));
    width: 8px;
}

/* History card */
.history-card {
    transition: all 0.2s ease;
    cursor: pointer;
}

.history-card:hover {
    transform: translateX(-4px);
    box-shadow: 4px 0 12px rgba(108, 92, 231, 0.3);
}

/* Pill button */
.pill-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.pill-btn:hover {
    border-color: var(--banana-dim);
    color: var(--text-primary);
}

.pill-btn.active {
    background: linear-gradient(135deg, var(--banana-dim), var(--banana));
    color: var(--bg-primary);
    border-color: var(--banana);
    font-weight: 600;
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Map search box */
.map-search {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: flex;
    gap: 4px;
}

.map-search input {
    background: rgba(10, 10, 26, 0.9);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 8px 14px;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    width: 220px;
    backdrop-filter: blur(10px);
    outline: none;
}

.map-search input:focus {
    border-color: var(--banana-dim);
}

.map-search input::placeholder {
    color: var(--text-secondary);
}

/* Style toggle */
.map-style-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    gap: 2px;
    background: rgba(10, 10, 26, 0.85);
    border-radius: 12px;
    padding: 3px;
    backdrop-filter: blur(10px);
}

/* Random button */
.random-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 5;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--banana-dim));
    border: none;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.5);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.random-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 30px rgba(108, 92, 231, 0.7);
}

/* Token input overlay */
.token-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 26, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.token-box {
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    text-align: center;
}

.token-box input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    margin: 16px 0;
    outline: none;
}

.token-box input:focus {
    border-color: var(--banana);
}

.token-box button {
    background: linear-gradient(135deg, var(--banana-dim), var(--banana));
    color: var(--bg-primary);
    border: none;
    padding: 12px 32px;
    border-radius: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.token-box button:hover {
    transform: scale(1.05);
}

/* Popup style */
.mapboxgl-popup-content {
    background: rgba(10, 10, 26, 0.92) !important;
    color: var(--text-primary) !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 12px !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}

.mapboxgl-popup-tip {
    border-top-color: rgba(10, 10, 26, 0.92) !important;
}

@media (max-width: 768px) {
    .resize-handle {
        display: none;
    }
}