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

:root {
    --bg-primary: #E8E4E0;
    --bg-secondary: #D5D0CB;
    --pedestal: #E8E0D5;
    --card-border: #F5E6C8;
    --banana-yellow: #FFE135;
    --banana-gold: #FFD700;
    --text-dark: #333333;
    --text-light: #666666;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    overflow: hidden;
    color: var(--text-dark);
    min-height: 100vh;
}

body.banana-mode {
    background: linear-gradient(135deg, #FFF8DC 0%, #FFE135 100%);
}

#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: opacity 0.3s ease;
}

#header {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
}

#city-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--text-dark);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#subtitle {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--banana-gold);
    margin-top: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

#city-selector {
    position: fixed;
    top: 30px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#city-dropdown, #style-dropdown {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 16px;
    padding-right: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.2s ease;
}

#city-dropdown:hover, #style-dropdown:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#generate-btn {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--banana-yellow) 0%, var(--banana-gold) 100%);
    color: var(--text-dark);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 225, 53, 0.4);
    transition: all 0.2s ease;
}

#generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 225, 53, 0.5);
}

#style-selector {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#style-selector label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.05em;
}

#mode-toggle {
    position: fixed;
    top: 180px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mode-btn {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 500;
    padding: 8px 14px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn.active {
    background: var(--text-dark);
    color: white;
    border-color: var(--text-dark);
}

.mode-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--banana-yellow);
}

#art-cards-container {
    position: fixed;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    z-index: 50;
    transition: all 0.3s ease;
}

#art-cards-container.hidden {
    opacity: 0;
    pointer-events: none;
}

#art-cards-container.gallery-mode {
    bottom: 50%;
    transform: translate(-50%, 50%);
    gap: 50px;
}

#art-cards-container.gallery-mode .art-card {
    width: 200px;
    height: 200px;
}

.art-card {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 3px solid var(--card-border);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: float 4s ease-in-out infinite;
}

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

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

.art-card:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 0 20px rgba(255, 225, 53, 0.3);
}

.art-card.loaded {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 15px rgba(255, 225, 53, 0.2);
}

.art-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.art-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.art-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFF8DC 0%, #FFFACD 100%);
    gap: 8px;
}

.banana-spinner {
    font-size: 28px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-light);
}

.art-watermark {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 8px;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 5px;
    border-radius: 4px;
    opacity: 0.7;
}

.retry-btn {
    font-size: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-top: 5px;
}

#generation-status {
    position: fixed;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.status-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.status-emoji {
    animation: bounce 0.6s ease infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-3px); }
}

#status-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
}

#building-labels {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 100px;
    z-index: 100;
}

.label-group {
    text-align: center;
    min-width: 100px;
    position: relative;
}

.building-name {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 4px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.height {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.year {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-light);
    margin-top: 2px;
}

.ai-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 12px;
    opacity: 0.6;
}

#controls-panel {
    position: fixed;
    bottom: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

#controls-panel button {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

#controls-panel button:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#rotate-btn {
    opacity: 0.6;
}

#tooltip {
    position: fixed;
    display: none;
    background: rgba(51, 51, 51, 0.95);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

#sparkles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 60;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    font-size: 14px;
    animation: sparkle-fade 2s ease-out forwards;
    pointer-events: none;
}

.sparkle.burst {
    animation: sparkle-burst 0.8s ease-out forwards;
}

@keyframes sparkle-fade {
    0% { opacity: 0; transform: scale(0) translateY(0); }
    50% { opacity: 1; transform: scale(1) translateY(-20px); }
    100% { opacity: 0; transform: scale(0.5) translateY(-40px); }
}

@keyframes sparkle-burst {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { 
        opacity: 0; 
        transform: translate(calc(cos(var(--angle)) * 60px), calc(sin(var(--angle)) * 60px)) scale(0);
    }
}

#expanded-art {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

#expanded-art.hidden {
    opacity: 0;
    pointer-events: none;
}

.expanded-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.expanded-content {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 90vw;
    max-height: 90vh;
}

.expanded-content img {
    display: block;
    max-width: 80vw;
    max-height: 70vh;
    object-fit: contain;
}

.expanded-info {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #FAFAFA;
}

.expanded-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.download-btn, .close-btn {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn {
    background: linear-gradient(135deg, var(--banana-yellow) 0%, var(--banana-gold) 100%);
    color: var(--text-dark);
}

.close-btn {
    background: #EEE;
    color: var(--text-dark);
}

.download-btn:hover, .close-btn:hover {
    transform: translateY(-1px);
}

footer {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 400;
    color: var(--text-light);
    z-index: 100;
}

footer a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--banana-gold);
}

@media (max-width: 768px) {
    #city-title {
        font-size: 22px;
        letter-spacing: 0.15em;
    }
    
    #subtitle {
        font-size: 9px;
    }
    
    #city-selector {
        top: 20px;
        right: 12px;
    }
    
    #city-dropdown, #style-dropdown {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    #generate-btn {
        font-size: 11px;
        padding: 10px 14px;
    }
    
    #style-selector {
        top: 85px;
        right: 12px;
    }
    
    #mode-toggle {
        top: 155px;
        right: 12px;
    }
    
    .mode-btn {
        font-size: 10px;
        padding: 6px 10px;
    }
    
    #art-cards-container {
        bottom: 160px;
        gap: 15px;
    }
    
    .art-card {
        width: 80px;
        height: 80px;
    }
    
    #building-labels {
        gap: 40px;
        bottom: 50px;
    }
    
    .label-group {
        min-width: 70px;
    }
    
    .building-name {
        font-size: 7px;
    }
    
    .height {
        font-size: 16px;
    }
    
    .year {
        font-size: 11px;
    }
    
    #controls-panel {
        bottom: 80px;
        right: 12px;
    }
    
    #controls-panel button {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    
    #generation-status {
        bottom: 130px;
    }
    
    .status-inner {
        padding: 6px 12px;
    }
    
    #status-text {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    #building-labels {
        gap: 20px;
    }
    
    .label-group {
        min-width: 55px;
    }
    
    #art-cards-container {
        gap: 10px;
    }
    
    .art-card {
        width: 65px;
        height: 65px;
    }
    
    .height {
        font-size: 14px;
    }
    
    .year {
        font-size: 10px;
    }
}