/* Hyphy Burger - Main Styles */
/* Oakland's Finest Smashburger Joint */

/* Base Styles */
body {
    background-color: #f87171;
    background-image: 
        linear-gradient(45deg, #ffffff 25%, transparent 25%),
        linear-gradient(-45deg, #ffffff 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ffffff 75%),
        linear-gradient(-45deg, transparent 75%, #ffffff 75%);
    background-size: 40px 40px;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Floating Order Button Animation */
@keyframes float-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#floating-order-btn {
    animation: float-bounce 2s ease-in-out infinite;
}

#floating-order-btn:hover {
    animation-play-state: paused;
}

body::-webkit-scrollbar {
    display: none;
}

/* Retro Font */
.font-retro {
    font-family: 'Press Start 2P', cursive;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: none;
    image-rendering: pixelated;
}

/* Tray Container Styles */
.tray-base-img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

#tray-container {
    position: relative;
    /* Item positions */
    --burger-top: 25%;
    --burger-left: 38%;
    --shake-top: 6%;
    --shake-left: 68%;
    --receipt-top: 47%;
    --receipt-left: 62%;
    --napkin-top: 15%;
    --napkin-left: 19%;
    --phone-top: 56%;
    --phone-left: 18%;
    --game-top: 65%;
    --game-left: 45%;
    --music-top: 75%;
    --music-left: 65%;
    --catering-top: 40%;
    --catering-left: 80%;
    --jobs-top: 20%;
    --jobs-left: 8%;
    /* Label positions */
    --label-burger-top: 20%;
    --label-burger-left: 50%;
    --label-shake-top: 1%;
    --label-shake-left: 75%;
    --label-receipt-top: 44%;
    --label-receipt-left: 65%;
    --label-napkin-top: 10%;
    --label-napkin-left: 25%;
    --label-phone-top: 51%;
    --label-phone-left: 22%;
    --label-game-top: 61%;
    --label-game-left: 50%;
    /* Music, Catering, Jobs label positions removed */
}

/* Tray Items */
.tray-item {
    position: absolute;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, filter 0.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.4));
    z-index: 50;
}

.tray-item:hover {
    transform: scale(1.1);
    filter: brightness(1.1) drop-shadow(3px 6px 8px rgba(0,0,0,0.5));
}

/* Individual Tray Item Positions */
#tray-item-burger { top: var(--burger-top); left: var(--burger-left); }
#tray-item-shake { top: var(--shake-top); left: var(--shake-left); }
#tray-item-receipt { top: var(--receipt-top); left: var(--receipt-left); }
#tray-item-napkin { top: var(--napkin-top); left: var(--napkin-left); }
#tray-item-phone { top: var(--phone-top); left: var(--phone-left); }
#tray-item-game { top: var(--game-top); left: var(--game-left); }
/* Tray item positions moved to fixed positions section above */

/* Tray items music, catering, and jobs removed - functionality combined into Info Hub */

/* Scale handles for tray items */
.scale-handle {
    position: absolute;
    width: 15px;
    height: 15px;
    background: #fbbf24;
    border: 2px solid #000;
    border-radius: 50%;
    cursor: nwse-resize;
    z-index: 101;
    display: none;
}

.tray-item.edit-mode .scale-handle {
    display: block;
}

.scale-handle.top-left {
    top: -7px;
    left: -7px;
    cursor: nw-resize;
}

.scale-handle.top-right {
    top: -7px;
    right: -7px;
    cursor: ne-resize;
}

.scale-handle.bottom-left {
    bottom: -7px;
    left: -7px;
    cursor: sw-resize;
}

.scale-handle.bottom-right {
    bottom: -7px;
    right: -7px;
    cursor: se-resize;
}

/* Draggable Windows Enhancement */
.content-section {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.content-section.dragging {
    opacity: 0.9;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}
.edit-mode-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 150;
    background: #fbbf24;
    color: #000;
    border: 2px solid #000;
    padding: 8px 12px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.8);
    transition: all 0.2s ease;
}

.edit-mode-toggle:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px rgba(0,0,0,0.7);
    background: #facc15;
}

.edit-mode-toggle.active {
    background: #f87171;
    color: #fff;
}

/* Reset positions button */
.reset-positions-btn {
    position: absolute;
    top: 10px;
    right: 140px;
    z-index: 150;
    background: #60a5fa;
    color: #fff;
    border: 2px solid #000;
    padding: 8px 12px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.8);
    transition: all 0.2s ease;
    display: none;
}

.reset-positions-btn.visible {
    display: block;
}

.reset-positions-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px rgba(0,0,0,0.7);
    background: #3b82f6;
}

/* Draggable & Resizable Sections */
.draggable-section {
    position: fixed !important;
    z-index: 900;
    cursor: move;
    user-select: none;
    transition: none !important;
    resize: both;
    overflow: auto;
    min-width: 300px;
    min-height: 200px;
    max-width: 90vw;
    max-height: 90vh;
}

.draggable-section.dragging {
    opacity: 0.9;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: scale(1.02);
}

/* Drag Handle */
.drag-handle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
    cursor: grab;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem 0.5rem 0 0;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle::before {
    content: '⋮⋮⋮';
    color: #fbbf24;
    font-size: 1.5rem;
    letter-spacing: 3px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Resize Handle */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    cursor: nw-resize;
    z-index: 11;
    background: linear-gradient(135deg, transparent 50%, rgba(251, 191, 36, 0.5) 50%);
    border-radius: 0 0 0.5rem 0;
}

.resize-handle::before {
    content: '↘';
    position: absolute;
    bottom: 2px;
    right: 2px;
    color: #fbbf24;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Controls for draggable sections */
.draggable-controls {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    z-index: 12;
}

.draggable-controls button {
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(0,0,0,0.7);
    color: #fbbf24;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.draggable-controls button:hover {
    background: #fbbf24;
    color: #000;
    transform: scale(1.1);
}

/* Minimize state */
.draggable-section.minimized {
    height: 50px !important;
    min-height: 50px !important;
    overflow: hidden;
}

.draggable-section.minimized .content-section {
    display: none;
}

.draggable-section.minimized .drag-handle::after {
    content: attr(data-title);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #fbbf24;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
    white-space: nowrap;
}

/* Pin indicator */
.draggable-section.pinned {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.draggable-section.pinned .drag-handle {
    background: linear-gradient(to bottom, rgba(251, 191, 36, 0.2), transparent);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .draggable-section {
        min-width: 250px;
        min-height: 150px;
    }
    
    .drag-handle {
        height: 50px;
    }
}

/* Tray Labels */
.tray-label {
    position: absolute;
    transform: translateX(-50%);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    pointer-events: none;
    white-space: nowrap;
    z-index: 60;
    font-size: 0.75rem;
    padding: 0.1rem 0.2rem;
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* Individual Label Positions */
#label-burger { top: var(--label-burger-top); left: var(--label-burger-left); }
#label-shake { top: var(--label-shake-top); left: var(--label-shake-left); }
#label-receipt { top: var(--label-receipt-top); left: var(--label-receipt-left); }
#label-napkin { top: var(--label-napkin-top); left: var(--label-napkin-left); }
#label-phone { top: var(--label-phone-top); left: var(--label-phone-left); }
#label-game { top: var(--label-game-top); left: var(--label-game-left); }
/* Music, Catering, Jobs labels removed */

/* Content Section Styles */
.content-section {
    background-color: rgba(255, 255, 255, 0.95);
    border: 4px dashed #60a5fa;
    box-shadow: 
        inset 0 0 10px rgba(0,0,0,0.1),
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 2rem;
    border-radius: 0.5rem;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Embed Container Styles */
.embed-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%;
}

.map-container {
    padding-top: 75%;
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Content Item Styles */
.content-item {
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.content-category-title {
    font-family: 'Press Start 2P', cursive;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid;
    font-size: 1.125rem;
    text-align: center;
}

/* Social Media Embed Styles */
.tiktok-embed,
.instagram-media,
.youtube-embed-container,
.sk-ww-instagram-hashtag-feed {
    max-width: 450px !important;
    width: 100% !important;
    margin: 0.5rem auto !important;
}

/* Button Styles */
.close-btn,
.submit-btn,
.game-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.875rem;
    padding: 0.6rem 1.2rem;
    border: 2px solid black;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.8);
    transition: all 0.1s ease-in-out;
    text-transform: uppercase;
    cursor: pointer;
    color: black;
    background-color: white;
    border-radius: 5px;
}

.close-btn:hover,
.submit-btn:hover,
.game-button:hover {
    filter: brightness(1.1);
    box-shadow: 3px 3px 0px rgba(0,0,0,0.7);
    transform: translate(-1px, -1px);
    background-color: #eee;
}

.close-btn:active,
.submit-btn:active,
.game-button:active {
    box-shadow: 1px 1px 0px rgba(0,0,0,0.9);
    transform: translate(1px, 1px);
}

/* Merch Grid Styles */
.merch-item-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    max-width: 100%;
}

@media (min-width: 640px) {
    .merch-item-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .merch-item-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Individual Merch Item Card - Hyphy Burger Theme */
.merch-item {
    position: relative;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 3px solid #3b82f6; /* Blue border */
    transform-style: preserve-3d;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.merch-item:hover {
    transform: translateY(-8px) scale(1.03) rotate(1deg);
    border-color: #ef4444;
    box-shadow: 
        0 12px 24px rgba(239, 68, 68, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(251, 191, 36, 0.2);
    background: #fffbeb;
}

/* Merch Item Image Container */
.merch-item-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio - Perfect Square */
    overflow: hidden;
    background: #ef4444; /* Red background */
    border: 3px solid #3b82f6; /* Blue border all around */
    margin: 3px; /* Small margin to show the border properly */
}

.merch-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

/* Primary and Secondary Images */
.merch-item .primary-image {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.merch-item .secondary-image {
    opacity: 0;
    transform: scale(1.1);
    z-index: 1;
}

/* Hover Image Swap Effect */
.merch-item:hover .primary-image {
    opacity: 0;
    transform: scale(1.1);
}

.merch-item:hover .secondary-image {
    opacity: 1;
    transform: scale(1);
}

/* Loading/Placeholder State */
.merch-item-image-wrapper.loading {
    background: linear-gradient(45deg, #1a1a1a 25%, #2a2a2a 25%, #2a2a2a 50%, #1a1a1a 50%, #1a1a1a 75%, #2a2a2a 75%, #2a2a2a);
    background-size: 20px 20px;
    animation: loadingMove 0.5s linear infinite;
}

@keyframes loadingMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 20px;
    }
}

/* Image Hover Zoom Alternative (if no second image) */
.merch-item-image-wrapper.single-image img {
    transform-origin: center;
}

.merch-item-image-wrapper.single-image:hover img {
    transform: scale(1.2);
    filter: brightness(1.1) contrast(1.1);
}

/* Multiple Images Indicator */
.merch-item-image-wrapper::after {
    content: '🔄';
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fbbf24;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.merch-item-image-wrapper:not(.single-image)::after {
    opacity: 0.8;
}

.merch-item:hover .merch-item-image-wrapper:not(.single-image)::after {
    opacity: 1;
    content: 'Hover for alt view';
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5rem;
    padding: 6px 10px;
    background: rgba(251, 191, 36, 0.9);
    color: #000;
}

/* Image Loading State */
.merch-item img[src=""],
.merch-item img:not([src]) {
    opacity: 0;
}

.merch-item img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Mobile Touch - Show indicator on mobile */
@media (max-width: 768px) {
    .merch-item-image-wrapper:not(.single-image)::after {
        opacity: 1;
        content: '👆 Tap to view';
        font-size: 0.6rem;
    }
    
    /* Mobile tap to switch images */
    .merch-item-image-wrapper:not(.single-image):active .primary-image {
        opacity: 0;
    }
    
    .merch-item-image-wrapper:not(.single-image):active .secondary-image {
        opacity: 1;
        transform: scale(1);
    }
}

/* Merch Item Content */
.merch-item-content {
    padding: 1rem;
    position: relative;
    z-index: 2;
    background: white;
}

.merch-item-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: #ef4444;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.merch-item:hover .merch-item-name {
    color: #dc2626;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.merch-item-price {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 0.25rem;
    background: #fbbf24;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
}

.merch-item-status {
    font-size: 0.65rem;
    font-family: 'Press Start 2P', cursive;
    color: #ef4444;
    text-transform: uppercase;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Hover Glow Effect */
.merch-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #fbbf24, #f87171, #fbbf24);
    border-radius: 0.75rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.merch-item:hover::before {
    opacity: 1;
    animation: glowRotate 2s linear infinite;
}

@keyframes glowRotate {
    0% {
        background: linear-gradient(45deg, #fbbf24, #f87171, #fbbf24);
    }
    50% {
        background: linear-gradient(45deg, #f87171, #fbbf24, #f87171);
    }
    100% {
        background: linear-gradient(45deg, #fbbf24, #f87171, #fbbf24);
    }
}

/* Add to Cart Quick Button (shows on hover) */
.merch-item-quick-add {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #fbbf24;
    color: #000;
    padding: 0.5rem 1rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    border: none;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
    white-space: nowrap;
}

.merch-item:hover .merch-item-quick-add {
    bottom: 10px;
}

.merch-item-quick-add:hover {
    background: #ffffff;
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5);
}

/* Loading State */
.merch-item.loading {
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(40,40,40,0.7) 50%, rgba(0,0,0,0.7) 100%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Merch Filter Buttons - Already styled inline in HTML */
.merch-filter-btn {
    transition: all 0.2s ease;
}

.merch-filter-btn.active {
    background: #ef4444 !important;
    color: white !important;
    transform: scale(1.05);
}

/* Merch item hidden state for filtering */
.merch-item.hidden {
    display: none;
}

/* Responsive adjustments for mobile */
@media (max-width: 640px) {
    .merch-filter-btn {
        font-size: 0.5rem;
        padding: 0.4rem 0.8rem;
    }
    
    .merch-item-name {
        font-size: 0.6rem;
    }
    
    .merch-item-price {
        font-size: 1rem;
    }
}

/* Brick Wall Style - Enhanced for Merch Section */
.brick-wall {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('https://3dtextures.me/wp-content/uploads/2020/06/Brick-Wall-021-1K-JPG.jpg');
    background-size: cover;
    background-attachment: fixed;
    padding: 2rem;
    border: 4px solid #000;
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.8),
        0 0 40px rgba(251, 191, 36, 0.2);
    position: relative;
    overflow: hidden;
}

.brick-wall::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.4) 70%);
    pointer-events: none;
}

/* Merch Section Title Enhancement */
.brick-wall h2 {
    position: relative;
    z-index: 2;
    text-shadow: 
        2px 2px 4px rgba(0,0,0,0.9),
        0 0 20px rgba(251, 191, 36, 0.5);
}

.brick-wall p {
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
}

/* Suggestion Mascot */
#suggestion-mascot {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 90px;
    height: auto;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s ease-in-out;
    filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.5));
}

#suggestion-mascot:hover {
    transform: scale(1.1);
}

#suggestion-label {
    position: fixed;
    bottom: 5rem;
    right: calc(1rem + 45px);
    transform: translateX(50%);
    color: white;
    font-weight: bold;
    font-size: 0.7rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
    pointer-events: none;
    z-index: 110;
    background-color: rgba(0,0,0,0.3);
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    white-space: nowrap;
}

/* Modal Styles */
#suggestion-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#suggestion-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    border: 4px solid #fbbf24;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #374151;
}

/* Game Area Styles */
#game-area {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 60vh;
    background-image: url('https://i.imgur.com/RuKOZc7.gif');
    background-size: cover;
    background-position: center;
    border: 3px solid black;
    border-radius: 0.5rem;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Game Player */
#game-player {
    position: absolute;
    bottom: 10px;
    left: 50px;
    width: 60px;
    height: 45px;
    background-color: transparent;
    background-image: url('https://i.imgur.com/Xg3I0cJ.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
    will-change: bottom, left, transform, filter;
    transition: transform 0.1s ease-out, filter 0.2s ease-out, opacity 0.2s ease-out;
}

#game-player.jump {
    transform: rotate(-5deg) scaleY(0.95);
}

#game-player.invincible {
    filter: brightness(1.5) drop-shadow(0 0 8px #ffff00);
    animation: pulse 0.5s infinite alternate;
}

#game-player.slowed {
    opacity: 0.6;
    filter: grayscale(50%);
}

#game-player.hyphy-dash {
    background-image: url('https://i.imgur.com/5cfbqTU.png') !important;
    filter: none;
    animation: none;
}

@keyframes pulse {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* Game Items */
.game-item {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    will-change: left;
    z-index: 5;
}

.game-obstacle {
    width: 40px;
    height: 40px;
    bottom: 10px;
}

.game-collectible {
    width: 35px;
    height: 35px;
    z-index: 6;
}

/* Obstacle Types */
.obstacle-pothole {
    height: 30px;
    bottom: 5px;
}

.obstacle-police {
    width: 65px;
    height: 40px;
}

.obstacle-oil {
    width: 50px;
    height: 20px;
    bottom: 5px;
    opacity: 0.8;
    background-image: url('https://i.imgur.com/gaMOEEF.png');
    background-size: cover;
}

.obstacle-dirtbike {
    width: 55px;
    height: 40px;
}

.obstacle-nissan {
    width: 60px;
    height: 35px;
}

/* Collectible Types */
.collectible-customer {
    width: 30px;
    height: 50px;
}

.collectible-burnout {
    width: 40px;
    height: 40px;
}

.collectible-invincible {
    width: 40px;
    height: 40px;
    background-image: url('https://i.imgur.com/3KrlRzF.png');
    animation: spin 2s linear infinite;
}

.collectible-magnet {
    width: 35px;
    height: 35px;
    background-image: url('https://i.imgur.com/Ov47NZn.png');
}

.collectible-shake {
    width: 30px;
    height: 40px;
}

/* Game Effects */
.fireball {
    position: absolute;
    width: 25px;
    height: 25px;
    background-image: url('https://i.imgur.com/f2aVTQX.gif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 15;
    will-change: left, top;
}

.explosion {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url('https://i.imgur.com/2XFqC89.gif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 20;
    pointer-events: none;
}

.satisfied-customer-effect {
    position: absolute;
    width: 40px;
    height: 60px;
    background-image: url('https://i.imgur.com/FNCr0h1.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 100;
    animation: fadeOutQuick 0.7s ease-out forwards;
    pointer-events: none;
}

.plus-one-effect,
.burnout-plus-one-effect {
    position: absolute;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    text-shadow: 1px 1px 1px black;
    pointer-events: none;
    z-index: 110;
    animation: fadeUp 0.6s ease-out forwards;
}

.plus-one-effect {
    color: #facc15;
}

.burnout-plus-one-effect {
    color: #ef4444;
}

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

@keyframes fadeOutQuick {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(1.2);
    }
}

@keyframes fadeUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Game Score Area */
#game-score-area {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.1rem;
    color: white;
    text-shadow: 1px 1px 2px black;
    z-index: 100;
    font-family: 'Press Start 2P', cursive;
    background-color: rgba(0,0,0,0.3);
    padding: 5px 10px;
    border-radius: 5px;
    min-width: 150px;
}

#game-score {
    margin-bottom: 2px;
}

#high-score {
    font-size: 0.8rem;
    opacity: 0.8;
}

#combo-counter {
    font-size: 0.8rem;
    opacity: 0.8;
    color: #facc15;
    margin-top: 4px;
}

#burnout-counter {
    font-size: 0.8rem;
    opacity: 0.8;
    color: #ef4444;
    margin-top: 4px;
}

#delivered-counter {
    font-size: 0.8rem;
    opacity: 0.8;
    color: #34d399;
    margin-top: 4px;
}

#powerup-indicator {
    font-size: 0.9rem;
    margin-top: 6px;
    font-weight: bold;
    text-align: center;
}

/* Game Message Overlay */
#game-message-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    z-index: 200;
    font-family: 'Press Start 2P', cursive;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#game-message-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Game Controls */
#game-controls-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

#jump-button,
#fire-button {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

@media (min-width: 640px) {
    #jump-button,
    #fire-button {
        padding: 15px;
        font-size: 1rem;
    }
}

#jump-button {
    background-color: #fca5a5;
    border-color: #7f1d1d;
    color: #7f1d1d;
}

#jump-button:hover {
    background-color: #f87171;
}

#fire-button {
    background-color: #fdba74;
    border-color: #9a3412;
    color: #9a3412;
}

#fire-button:hover {
    background-color: #fb923c;
}

/* Particle Effect */
.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: gold;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    animation: fadeOutScale 0.5s ease-out forwards;
}

@keyframes fadeOutScale {
    from {
        transform: scale(0.5);
        opacity: 1;
    }
    to {
        transform: scale(2);
        opacity: 0;
    }
}