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

:root {
    /* Day colors */
    --sky-top: #87CEEB;
    --sky-bottom: #E0F6FF;
    --sidewalk: #808080;
    --wall-brick: #8B4513;
    --wall-concrete: #A0A0A0;
    --shadow-opacity: 0.3;
    --lamp-glow: 0;
    --ambient: 1;
    
    /* Transition */
    --transition-speed: 1.5s;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    min-height: 100vh;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

body.night {
    --sky-top: #0a0a1a;
    --sky-bottom: #1a1a3a;
    --sidewalk: #404040;
    --shadow-opacity: 0.6;
    --lamp-glow: 1;
    --ambient: 0.4;
}

/* Day/Night Toggle */
.toggle-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    font-size: 1.8rem;
    transition: transform 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    transform: scale(1.1);
}

.toggle-btn .sun,
.toggle-btn .moon {
    position: absolute;
    transition: opacity 0.5s, transform 0.5s;
}

.toggle-btn .moon {
    opacity: 0;
    transform: rotate(-90deg);
}

body.night .toggle-btn {
    background: rgba(30,30,50,0.9);
}

body.night .toggle-btn .sun {
    opacity: 0;
    transform: rotate(90deg);
}

body.night .toggle-btn .moon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Street Container */
.street-container {
    width: 100%;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.street {
    display: flex;
    height: 100vh;
    min-width: 400vw;
    position: relative;
}

/* Sky */
.sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom));
    transition: background var(--transition-speed) ease;
    z-index: -2;
}

/* Add stars for night */
body.night .sky::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, white, transparent),
        radial-gradient(1px 1px at 90px 40px, white, transparent),
        radial-gradient(2px 2px at 130px 80px, white, transparent),
        radial-gradient(1px 1px at 160px 30px, white, transparent),
        radial-gradient(2px 2px at 200px 60px, white, transparent),
        radial-gradient(1px 1px at 20px 100px, white, transparent),
        radial-gradient(2px 2px at 80px 120px, white, transparent);
    background-size: 250px 150px;
    animation: twinkle 3s infinite alternate;
}

@keyframes twinkle {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Background buildings */
.buildings-bg {
    position: fixed;
    bottom: 30%;
    left: 0;
    width: 400vw;
    height: 30%;
    background: 
        linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%),
        repeating-linear-gradient(
            90deg,
            #4a4a5a 0px,
            #4a4a5a 80px,
            #3a3a4a 80px,
            #3a3a4a 120px,
            #5a5a6a 120px,
            #5a5a6a 200px,
            #3a3a4a 200px,
            #3a3a4a 250px
        );
    z-index: -1;
    filter: brightness(var(--ambient));
    transition: filter var(--transition-speed);
}

/* Wall Sections */
.wall-section {
    flex: 0 0 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 15vh;
    position: relative;
    scroll-snap-align: start;
}

.wall-surface {
    height: 50vh;
    margin: 0 1rem;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter var(--transition-speed);
    filter: brightness(var(--ambient));
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    padding: 1rem;
    gap: 0.5rem;
}

.wall-surface:hover {
    transform: scale(1.01);
    box-shadow: 0 0 30px rgba(255,255,255,0.2);
}

/* Zone specific walls */
.premium .wall-surface {
    background: 
        linear-gradient(135deg, rgba(255,215,0,0.1) 0%, transparent 50%),
        repeating-linear-gradient(
            0deg,
            #8B4513 0px,
            #8B4513 20px,
            #6B3510 20px,
            #6B3510 22px
        );
    border: 3px solid gold;
}

.central .wall-surface {
    background: 
        repeating-linear-gradient(
            0deg,
            #A0522D 0px,
            #A0522D 20px,
            #8B4513 20px,
            #8B4513 22px
        );
    border: 2px solid #ccc;
}

.standard .wall-surface {
    background: #707070;
    border: 2px solid #555;
}

.outer .wall-surface {
    background: 
        linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)),
        repeating-linear-gradient(
            90deg,
            #505050 0px,
            #505050 100px,
            #404040 100px,
            #404040 102px
        );
    border: 2px solid #333;
}

/* Zone labels */
.zone-label {
    position: absolute;
    top: 25vh;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2rem;
    white-space: nowrap;
    z-index: 10;
}

.zone-price {
    position: absolute;
    top: calc(25vh + 3rem);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #00ff88;
    padding: 0.3rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    white-space: nowrap;
    z-index: 10;
}

/* Sidewalk */
.sidewalk {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 400vw;
    height: 15vh;
    background: 
        repeating-linear-gradient(
            90deg,
            var(--sidewalk) 0px,
            var(--sidewalk) 50px,
            color-mix(in srgb, var(--sidewalk) 90%, black) 50px,
            color-mix(in srgb, var(--sidewalk) 90%, black) 52px
        );
    transition: background var(--transition-speed);
    z-index: 5;
}

/* Walking people removed */

/* Street lamps */
.street-lights {
    position: fixed;
    bottom: 15vh;
    left: 0;
    width: 400vw;
    height: 35vh;
    z-index: 4;
    pointer-events: none;
}

.lamp {
    position: absolute;
    width: 8px;
    height: 32vh;
    background: linear-gradient(to bottom, #555, #333);
    bottom: 0;
    border-radius: 2px;
}

.lamp::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 12px;
    background: #444;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.lamp::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 180px;
    background: radial-gradient(ellipse at top, rgba(255,220,150,calc(0.5 * var(--lamp-glow))), transparent 60%);
    pointer-events: none;
    transition: background var(--transition-speed);
}

/* Graffiti on wall */
.graffiti-item {
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    max-width: 90%;
    word-break: break-word;
    white-space: pre-wrap;
    transform: rotate(calc(-2deg + var(--rotation, 0deg)));
    animation: sprayIn 0.5s ease-out;
    line-height: 1.2;
    font-size: 2.5rem;
}

@keyframes sprayIn {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(calc(-3deg + var(--rotation, 0deg)));
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(calc(-3deg + var(--rotation, 0deg)));
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 20px;
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid #333;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: white;
}

.modal h2 {
    color: white;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #aaa;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #333;
    border-radius: 10px;
    background: #0a0a1a;
    color: white;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #00ff88;
}

.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #333;
    border-radius: 10px;
    background: #0a0a1a;
    color: white;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-group textarea:focus {
    outline: none;
    border-color: #00ff88;
}

.unit-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.char-count {
    color: #666;
    font-size: 0.8rem;
}

.unit-count {
    color: #00ff88;
    font-size: 0.9rem;
    font-weight: bold;
}

.unit-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0.5rem;
    min-height: 24px;
}

.unit-block {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-block.filled {
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid #00ff88;
    color: #00ff88;
}

.unit-block.partial {
    background: rgba(255, 204, 0, 0.2);
    border: 1px solid #ffcc00;
    color: #ffcc00;
}

.unit-block.empty {
    background: rgba(100, 100, 100, 0.2);
    border: 1px dashed #444;
    color: #666;
}

/* Style picker */
.style-picker {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.style-btn {
    padding: 0.6rem;
    border: 2px solid #333;
    border-radius: 10px;
    background: #0a0a1a;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.style-btn .style-name {
    font-size: 0.85rem;
    font-weight: bold;
}

.style-btn .style-desc {
    font-size: 0.65rem;
    color: #666;
}

.style-btn:hover {
    border-color: #666;
    transform: scale(1.02);
}

.style-btn.active {
    border-color: #00ff88;
    background: rgba(0,255,136,0.1);
}

.style-btn.active .style-desc {
    color: #00ff88;
}

/* Color picker */
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: white;
}

/* Preview */
.preview-box {
    background: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.7' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E"),
        repeating-linear-gradient(
            0deg,
            #4a3a2a 0px,
            #4a3a2a 12px,
            #3a2a1a 12px,
            #3a2a1a 14px
        );
    border-radius: 10px;
    padding: 2rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #2a1a0a;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.graffiti-preview {
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-align: center;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
}

/* Zone info */
.zone-info {
    background: rgba(0,255,136,0.1);
    border-radius: 10px;
    padding: 1rem;
}

.selected-zone {
    display: flex;
    justify-content: space-between;
    color: white;
}

#selectedZonePrice {
    color: #00ff88;
    font-weight: bold;
}

/* Total price */
.total-price {
    text-align: center;
    font-size: 1.5rem;
    color: white;
    margin: 1.5rem 0;
}

#totalPrice {
    color: #00ff88;
    font-weight: bold;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,255,136,0.4);
}

.btn-secondary {
    width: 100%;
    padding: 1rem;
    border: 2px solid #333;
    border-radius: 15px;
    background: transparent;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
}

/* Success modal */
.success-content {
    text-align: center;
}

.success-content p {
    color: #aaa;
    margin-bottom: 1.5rem;
}

.share-section {
    margin: 1.5rem 0;
}

.share-section label {
    color: #aaa;
    display: block;
    margin-bottom: 1rem;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.share-btn {
    padding: 0.8rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: scale(1.05);
}

.share-btn.facebook { background: #1877f2; color: white; }
.share-btn.twitter { background: #1da1f2; color: white; }
.share-btn.whatsapp { background: #25d366; color: white; }
.share-btn.copy { background: #333; color: white; }

/* Scroll hint */
.scroll-hint {
    position: fixed;
    bottom: 16vh;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    animation: fadeInOut 4s ease-in-out infinite;
}

.scroll-hint .swipe {
    font-size: 0.75rem;
    color: #888;
}

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

/* ============================================
   GRAFFITI STYLES - Authentic Street Art Look
   ============================================ */

/* Base graffiti styling */
.graffiti-item {
    position: relative;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Style 1: Bubble - Classic rounded graffiti */
.style-bubble {
    font-family: 'Bangers', cursive;
    font-size: 3.5rem;
    -webkit-text-stroke: 4px #000;
    paint-order: stroke fill;
    text-shadow:
        6px 6px 0 #000,
        8px 8px 0 rgba(0,0,0,0.4),
        10px 10px 12px rgba(0,0,0,0.3);
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.5));
}

/* Style 2: Wildstyle - Complex 3D letters */
.style-wildstyle {
    font-family: 'Rubik Mono One', monospace;
    font-size: 3rem;
    background: linear-gradient(180deg, currentColor 0%, color-mix(in srgb, currentColor 60%, black) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: 
        drop-shadow(3px 3px 0 #000)
        drop-shadow(6px 6px 0 #000)
        drop-shadow(9px 9px 0 rgba(0,0,0,0.5));
    -webkit-text-stroke: 2px #000;
}

/* Style 3: Neon - Glowing effect */
.style-neon {
    font-family: 'Monoton', cursive;
    font-size: 2.8rem;
    text-shadow:
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 40px currentColor,
        0 0 80px currentColor,
        0 0 120px color-mix(in srgb, currentColor 50%, white);
    animation: neonFlicker 3s ease-in-out infinite;
}

@keyframes neonFlicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.8; }
    94% { opacity: 1; }
    96% { opacity: 0.9; }
    97% { opacity: 1; }
}

/* Style 4: Throw-up - Quick outline style */
.style-throwup {
    font-family: 'Permanent Marker', cursive;
    font-size: 3.5rem;
    color: transparent !important;
    -webkit-text-stroke: 5px currentColor;
    text-shadow:
        4px 4px 0 rgba(0,0,0,0.5),
        8px 8px 6px rgba(0,0,0,0.3);
}

/* Style 5: Drip - Paint dripping */
.style-drip {
    font-family: 'Creepster', cursive;
    font-size: 3.2rem;
    -webkit-text-stroke: 3px #000;
    paint-order: stroke fill;
    text-shadow:
        3px 3px 0 #000,
        5px 5px 3px rgba(0,0,0,0.4);
    position: relative;
}

.style-drip::after {
    content: '▼ ▼  ▼   ▼';
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 0.35em;
    color: inherit;
    -webkit-text-stroke: 0;
    text-shadow: none;
    opacity: 0.8;
    animation: dripAnim 2s ease-in-out infinite;
}

@keyframes dripAnim {
    0%, 100% { transform: translateY(0); opacity: 0.8; }
    50% { transform: translateY(5px); opacity: 0.5; }
}

/* Style 6: Chrome - Metallic shine */
.style-chrome {
    font-family: 'Bungee', cursive;
    font-size: 3rem;
    background: linear-gradient(
        180deg,
        #fff 0%,
        #ddd 15%,
        #999 35%,
        #555 50%,
        #999 65%,
        #ddd 85%,
        #fff 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(4px 4px 0 #000) drop-shadow(8px 8px 4px rgba(0,0,0,0.4));
    -webkit-text-stroke: 2px #333;
}

/* Style 7: Stencil - Military/punk style */
.style-stencil {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.4rem;
    letter-spacing: 4px;
    text-shadow:
        2px 2px 0 rgba(0,0,0,0.8),
        4px 4px 4px rgba(0,0,0,0.4);
    position: relative;
}

.style-stencil::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: repeating-linear-gradient(
        45deg,
        transparent 0px,
        transparent 3px,
        rgba(0,0,0,0.15) 3px,
        rgba(0,0,0,0.15) 6px
    );
    pointer-events: none;
}

/* Style 8: Ghost - Faded old tag */
.style-ghost {
    font-family: 'Rock Salt', cursive;
    font-size: 2.2rem;
    opacity: 0.5;
    text-shadow:
        0 0 15px currentColor,
        0 0 30px color-mix(in srgb, currentColor 40%, transparent);
    filter: blur(0.8px);
}

/* Style 9: Block - Heavy 3D blocks */
.style-block {
    font-family: 'Fascinate', cursive;
    font-size: 3rem;
    -webkit-text-stroke: 3px #000;
    paint-order: stroke fill;
    text-shadow:
        3px 3px 0 #000,
        6px 6px 0 #000,
        9px 9px 0 #000,
        12px 12px 0 rgba(0,0,0,0.6),
        15px 15px 8px rgba(0,0,0,0.3);
}

/* Style 10: Gradient - Color fade */
.style-gradient {
    font-family: 'Rampart One', cursive;
    font-size: 3rem;
    background: linear-gradient(
        135deg,
        currentColor 0%,
        color-mix(in srgb, currentColor 70%, yellow) 50%,
        color-mix(in srgb, currentColor 50%, orange) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-text-stroke: 3px #000;
    paint-order: stroke fill;
    filter: drop-shadow(4px 4px 0 #000);
}

/* Legacy class mappings for compatibility */
.style-marker { font-family: 'Permanent Marker', cursive; }
.style-rock { font-family: 'Rock Salt', cursive; }
.style-rubik { font-family: 'Rubik Mono One', monospace; }
.style-bungee { font-family: 'Bungee', cursive; }
.style-bangers { font-family: 'Bangers', cursive; }
.style-fascinate { font-family: 'Fascinate', cursive; }
.style-monoton { font-family: 'Monoton', cursive; }
.style-pixel { font-family: 'Press Start 2P', cursive; font-size: 0.7em; }
.style-creepster { font-family: 'Creepster', cursive; }
.style-rampart { font-family: 'Rampart One', cursive; }

/* Responsive */
@media (min-width: 768px) {
    .wall-surface {
        margin: 0 2rem;
    }
    
    .graffiti-item {
        font-size: 1.2rem;
    }
    
    .toggle-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}
