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

body {
    font-family: 'Inter', sans-serif;
    height: 100vh;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow: hidden;
    background: linear-gradient(135deg, #2c1810 0%, #4a2c17 50%, #3d2414 100%);
    position: relative;
}

.bodega-container {
    height: 100vh;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    width: 100vw;
    position: relative;
    overflow: visible;
    background: url('../images/backgrounds/BodegaKitty3.webp') center 13% / cover no-repeat;
}


/* Welcome Overlay */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: none;
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.5s ease, pointer-events 0.5s ease;
}

.welcome-content {
    text-align: center;
    color: white;
    padding: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    border: 2px solid #ffd700;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    max-width: 500px;
}

.bodega-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #ffd700;
    text-shadow: 
        0 0 10px #ffd700,
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
    animation: titlePulse 2s ease-in-out infinite alternate;
}

@keyframes titlePulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.bodega-subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #ccc;
    font-style: italic;
}

.welcome-btn {
    background: linear-gradient(45deg, #ff6b6b 0%, #ffd700 100%);
    border: 3px solid #fff;
    border-radius: 50px;
    padding: 15px 30px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 20px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
    box-shadow: 
        0 5px 15px rgba(0,0,0,0.3),
        inset 0 2px 5px rgba(255,255,255,0.3);
}

.welcome-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.4),
        inset 0 2px 8px rgba(255,255,255,0.4);
    background: linear-gradient(45deg, #ff8e8e 0%, #ffe55c 100%);
}

.welcome-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-cat {
    font-size: 1.5rem;
}

.social-links {
    font-size: 0.9rem;
    color: #999;
}

.social-text {
    margin-right: 5px;
}

.social-handle {
    color: #ffd700;
    font-weight: bold;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.social-handle:hover {
    color: #fff;
    text-decoration: underline;
}

.art-credit {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    text-align: center;
}

/* Main Bodega Counter Page */
.bodega-main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: linear-gradient(135deg, #2c1810 0%, #4a2c17 50%, #3d2414 100%);
    display: none;
    overflow-y: auto;
    z-index: 150;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Bodega Header with Neon Sign */
.bodega-header {
    text-align: center;
    padding: 40px 0;
    background: 
        linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(45, 45, 45, 0.8) 100%),
        url('../images/backgrounds/header-bg-adobe.png') center center / cover no-repeat;
    border-bottom: 4px solid #ffd700;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}


.neon-sign {
    display: inline-block;
    position: relative;
    z-index: 10;
}

.bodega-name {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: #ffd700;
    text-shadow: 
        0 0 8px #ffd700,
        0 0 15px #ffd700,
        2px 2px 0 #000,
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.neon-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #ffd700;
    font-weight: 600;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.6),
        0 0 20px rgba(255, 215, 0, 0.4),
        0 0 30px rgba(255, 215, 0, 0.2);
    opacity: 1;
    letter-spacing: 1px;
}

@keyframes neonFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Main Content Layout */
.main-content-wrapper {
    display: flex;
    gap: clamp(15px, 3vw, 40px);
    width: 100%;
    margin: 0;
    padding: clamp(10px, 2vw, 25px);
    align-items: stretch;
    margin-top: clamp(10px, 2vw, 25px);
    margin-bottom: 20px;
}

.middle-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(15px, 2vw, 30px);
    min-width: 300px;
    max-width: 800px;
    margin: 0 auto;
}

/* Counter Section */
.counter-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    width: 100%;
}

.counter-display {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #ffd700;
    border-radius: 15px;
    padding: clamp(15px, 3vw, 45px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.register {
    text-align: center;
}

.counter-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.counter-title {
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    margin: 0;
    text-shadow: 0 0 10px #ffd700;
}

.price-display {
    margin-bottom: 25px;
}

.price-value {
    display: block;
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    font-size: clamp(1.2rem, 4vw, 4rem);
    text-shadow: 0 0 10px #ffd700;
    margin-bottom: clamp(3px, 0.5vw, 8px);
}

.price-change {
    color: #4ade80;
    font-weight: 600;
    font-size: 1.1rem;
}

.counter-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.counter-btn {
    background: linear-gradient(45deg, #ff6b6b 0%, #ffd700 100%);
    border: 3px solid #fff;
    border-radius: 25px;
    padding: 12px 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.counter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    background: linear-gradient(45deg, #ff8e8e 0%, #ffe55c 100%);
}

/* Wallet Section */
.wallet-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    width: 100%;
}

.wallet-boxes {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.5vw, 20px);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    align-items: center;
}

.wallet-box {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #ffd700;
    border-radius: 15px;
    padding: clamp(12px, 2.5vw, 35px);
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-size: clamp(0.8rem, 1.5vw, 1.4rem);
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wallet-box:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.6);
    border-color: #fff;
}

.wallet-title {
    color: #ffd700;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(0.8rem, 1.2vw, 1.4rem);
    margin-bottom: 8px;
    text-shadow: 0 0 5px #ffd700;
}

.wallet-address {
    color: #ccc;
    font-size: 0.8rem;
    font-family: 'Inter', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    word-break: break-all;
    transition: background 0.3s ease;
}

.wallet-address:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Left Wall - Community Board */
.left-wall {
    flex: 1;
    min-width: 300px;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.community-board {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #ffd700;
    border-radius: 15px;
    padding: clamp(15px, 3vw, 45px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    height: 100%;
    min-height: 400px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    font-size: clamp(0.8rem, 1.5vw, 1.4rem);
}

.board-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.board-title {
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    margin: 0;
    text-shadow: 0 0 10px #ffd700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.board-cat-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ffd700;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.twitter-feed {
    margin-bottom: 15px;
    width: 100%;
    flex: 1;
    overflow: visible;
}

.twitter-timeline {
    width: 100% !important;
    height: 300px !important;
    border-radius: 12px;
    overflow: hidden;
}

/* Hide loading text when fallback is active */
.twitter-feed.fallback-active .twitter-timeline {
    display: none !important;
}

.tweet-item {
    background: rgba(0, 0, 0, 0.6);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    border-left: 3px solid #ffd700;
    transition: background 0.3s ease;
}

.tweet-item:hover {
    background: rgba(0, 0, 0, 0.7);
}

.tweet-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.tweet-avatar {
    font-size: 1.2rem;
    margin-right: 8px;
}

.tweet-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tweet-name {
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.2;
}

.tweet-handle {
    color: #999;
    font-size: 0.75rem;
}

.tweet-time {
    color: #666;
    font-size: 0.7rem;
    position: absolute;
    right: 12px;
}

.tweet-content {
    color: white;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.tweet-stats {
    color: #666;
    font-size: 0.7rem;
    display: flex;
    gap: 15px;
}

.board-btn {
    width: 100%;
    background: #000000;
    color: white;
    border: 1px solid #333;
    border-radius: 25px;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.board-btn:hover {
    background: #1a1a1a;
    border-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.board-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Twitter Fallback Styling */
.twitter-fallback {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffd700;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.fallback-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.fallback-cat-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #ffd700;
    object-fit: cover;
    margin-bottom: 15px;
}

.fallback-content h3 {
    color: #ffd700;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.fallback-content p {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.fallback-btn {
    background: linear-gradient(45deg, #ff6b6b 0%, #ffd700 100%);
    color: #000;
    border: 2px solid #fff;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.fallback-btn:hover {
    background: linear-gradient(45deg, #ff8e8e 0%, #ffe55c 100%);
    transform: translateY(-2px);
}

/* Right Wall - Donations */
.right-wall {
    flex: 1;
    min-width: 300px;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.donation-corner {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #ffd700;
    border-radius: 15px;
    padding: clamp(15px, 3vw, 45px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    font-size: clamp(0.8rem, 1.5vw, 1.4rem);
}

.section-title {
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px #ffd700;
}

.donation-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.donation-info h4 {
    color: #ff6b6b;
    font-size: 1rem;
    margin-bottom: 5px;
}

.donation-info p {
    color: #ccc;
    font-size: 0.85rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.donation-amount {
    color: #4ade80;
    font-weight: 600;
    font-size: 0.9rem;
}

.donation-btn {
    width: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ffd700);
    color: #000;
    border: 3px solid #fff;
    border-radius: 25px;
    padding: 12px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.donation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    background: linear-gradient(45deg, #ff8e8e 0%, #ffe55c 100%);
}

/* Modern Charity Spotlight Section */
.charity-spotlight {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #ffd700;
    border-radius: 15px;
    padding: clamp(15px, 3vw, 25px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    font-size: clamp(0.8rem, 1.5vw, 1.4rem);
}

.charity-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.charity-title {
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    margin: 0;
    text-shadow: 0 0 10px #ffd700;
}

.charity-badge {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
    border-radius: 20px;
    padding: 4px 12px;
    color: #ffd700;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.charity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.charity-visual {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 25px;
}

.charity-image-container {
    position: relative;
    display: inline-block;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid #ffd700;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.charity-image-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    border-color: #ffed4a;
}

.charity-hero-image {
    width: 100%;
    max-width: 320px;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

.charity-image-container:hover .charity-hero-image {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.image-overlay {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px 0 12px 0;
    padding: 4px 8px;
    border: 2px solid #ffd700;
}

.tmtrd-logo-img {
    width: 50px;
    height: auto;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.charity-image-container:hover .tmtrd-logo-img {
    opacity: 1;
    transform: scale(1.1);
}


.charity-tagline {
    color: #ffd700;
    font-size: 1.3rem;
    font-style: normal;
    font-weight: 600;
    font-family: 'Fredoka One', cursive;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin-top: 12px;
    text-align: center;
}

.charity-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px 10px;
    margin: 10px 0;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    margin-bottom: 4px;
}

.stat-label {
    color: #aaa;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.charity-mission {
    text-align: center;
}

.charity-mission p {
    color: #fff;
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 15px;
    padding: 0 10px;
}

.mission-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.highlight-tag {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 15px;
    padding: 4px 10px;
    color: #ffd700;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.charity-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.charity-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 25px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.charity-btn.primary {
    background: linear-gradient(45deg, #ff6b6b 0%, #ffd700 100%);
    color: #000;
    border: 2px solid #fff;
}

.charity-btn.primary:hover {
    background: linear-gradient(45deg, #ff8e8e 0%, #ffe55c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.charity-btn.x-link {
    background: #000000;
    color: #ffffff;
    border: 2px solid #333333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.charity-btn.x-link:hover {
    background: #1a1a1a;
    border-color: #555555;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.x-icon {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Bodega Cat Game Section */
.game-title {
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    font-size: clamp(1rem, 2vw, 1.4rem);
    margin-bottom: 10px;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.5),
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
    text-align: center;
    letter-spacing: 1px;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 0px 20px 20px 20px;
}


#gameCanvas {
    background: 
        radial-gradient(circle at 15% 30%, rgba(255, 107, 107, 0.3) 0%, transparent 25%),
        radial-gradient(circle at 75% 20%, rgba(255, 215, 0, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 40% 80%, rgba(147, 112, 219, 0.25) 0%, transparent 35%),
        radial-gradient(circle at 85% 70%, rgba(50, 205, 50, 0.2) 0%, transparent 40%),
        linear-gradient(135deg, 
            rgba(44, 62, 80, 0.9) 0%, 
            rgba(52, 73, 94, 0.8) 30%, 
            rgba(34, 49, 63, 0.9) 70%, 
            rgba(44, 62, 80, 0.9) 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        );
    border: 3px solid #ffd700;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    max-width: 100%;
    height: auto;
}

.game-wrapper {
    position: relative;
    display: inline-block;
}

.game-score-overlay {
    position: absolute;
    top: 10px;
    right: 3px;
    z-index: 50;
    pointer-events: none;
}

.game-instructions {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.game-control-text {
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    font-size: 0.9rem;
    font-weight: 400;
    text-shadow: 
        0 0 8px rgba(255, 215, 0, 0.4),
        1px 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
    opacity: 1;
    letter-spacing: 0.5px;
}

#gameScore {
    color: #ffd700;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 12px;
    border-radius: 8px;
    border: 2px solid #ffd700;
}

/* Scrolling Text Banner */
.scrolling-banner {
    width: 100%;
    height: 72px;
    background: rgba(0, 0, 0, 0.9);
    border-top: 2px solid #ffd700;
    border-bottom: 2px solid #ffd700;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.scrolling-text {
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    font-size: clamp(1.35rem, 3.6vw, 2.7rem);
    font-weight: 600;
    text-shadow: 
        0 0 3px #ffd700,
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
    white-space: nowrap;
    animation: scroll-right 30s linear infinite;
}

@keyframes scroll-right {
    0% { transform: translateX(50%); }
    100% { transform: translateX(-100%); }
}

/* Bottom Shelf */
.bottom-shelf {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgb(139, 69, 19);
    padding: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
}

.shelf-items {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin: 0;
    padding: 13px 18px;
}

.shelf-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 4px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    flex: 1;
    max-width: 120px;
    min-height: 60px;
}

.shelf-item:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.5);
}

.item-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.item-label {
    color: #ffd700;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.81rem;
    margin-bottom: 2px;
    text-align: center;
}

.item-desc {
    color: #ccc;
    font-family: 'Inter', sans-serif;
    font-size: 0.63rem;
    text-align: center;
}


/* Animated Sandwich - Top */
.animated-sandwich-top {
    position: absolute;
    font-size: 2rem;
    z-index: 25;
    animation: sandwichGlideTop 15s linear infinite;
    top: 168px;
    filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.5));
}

@keyframes sandwichGlideTop {
    0% { left: -50px; }
    50% { left: calc(100vw - 50px); }
    100% { left: -50px; }
}

/* Animated Cat - Top */
.animated-cat-top {
    position: absolute;
    font-size: 2rem;
    z-index: 30;
    animation: catWalkTop 15s linear infinite;
    top: 168px;
    filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.5));
}

@keyframes catWalkTop {
    0% { left: calc(100vw - 50px); }
    50% { left: -50px; }
    100% { left: calc(100vw - 50px); }
}

/* Back Button */
.back-to-welcome {
    position: absolute;
    top: 100px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2000;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffd700;
}

.back-to-welcome:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #fff;
    transform: scale(1.05);
}

/* Clean Mobile Layout */
@media only screen and (max-width: 480px) {
    .bodega-name {
        font-size: 2.2rem;
    }
    
    .main-content-wrapper {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    .left-wall, .right-wall {
        width: 100%;
        min-width: auto;
    }
    
    .counter-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .counter-btn {
        width: 100%;
    }
    
    .game-container {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
    }
    
    /* Hide sliding emojis on mobile */
    .animated-sandwich-top,
    .animated-cat-top {
        display: none;
    }
    
    
    /* Hide background only when on main bodega page */
    .bodega-main {
        background: linear-gradient(135deg, #2c1810 0%, #4a2c17 50%, #3d2414 100%) !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 1 !important;
        padding-bottom: 70px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    /* Force scrolling text to show on mobile - simplified approach */
    .bottom-shelf {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 9999 !important;
        height: 50px !important;
    }
    
    .scrolling-banner {
        display: flex !important;
        height: 50px !important;
        width: 100% !important;
        overflow: hidden !important;
        align-items: center !important;
        background: rgba(0, 0, 0, 0.9) !important;
        border-top: 2px solid #ffd700 !important;
        border-bottom: 2px solid #ffd700 !important;
    }
    
    .scrolling-text {
        font-size: clamp(1rem, 3vw, 1.8rem) !important;
    }
    
    
    
    /* Enhanced mobile layout improvements */
    .counter-display {
        padding: 20px;
        margin: 0 10px;
    }
    
    .wallet-box {
        padding: 15px;
        margin: 0 10px;
    }
    
    .charity-content {
        padding: 15px;
    }
    
    .hamburger-menu {
        top: 15px;
        left: 15px;
        z-index: 2000;
    }
    
    /* Hide ALL back buttons on mobile - force sidebar navigation only */
    .back-to-welcome,
    .back-to-bodega,
    button[onclick*="goBackTo"] {
        display: none !important;
        visibility: hidden !important;
    }
    
    .charity-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .charity-btn {
        width: 100%;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-image {
        height: 250px;
    }
}



/* Browse Bodega Cats Photo Carousel Page */
.carousel-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: 
        linear-gradient(135deg, rgba(44, 24, 16, 0.7) 0%, rgba(74, 44, 23, 0.7) 50%, rgba(61, 36, 20, 0.7) 100%),
        url('../images/backgrounds/rainy nyc.gif') center center / cover no-repeat;
    display: none;
    flex-direction: column;
    z-index: 160;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-header {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid #ffd700;
}

.carousel-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #ffd700;
    text-shadow: 
        0 0 10px #ffd700,
        2px 2px 0 #000;
    margin-bottom: 5px;
}

.carousel-subtitle {
    color: #ccc;
    font-size: 1rem;
    font-style: italic;
}

/* Photo Gallery */
.photo-gallery {
    flex: 1;
    padding: 40px 20px 120px 20px;
    overflow-y: auto;
}

.hover-tip {
    text-align: center;
    color: #ffd700;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 25px;
    border: 1px solid #ffd700;
    max-width: 500px;
    margin: 0 auto 20px auto;
    opacity: 0.8;
    font-style: italic;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    border: 2px solid #ffd700;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    border-color: #ffed4a;
    filter: brightness(1.1);
}

/* Image Preview Popup */
.image-preview-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-preview-popup.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.preview-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffd700;
    border-radius: 50%;
    color: #ffd700;
    font-size: 1.4rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    font-family: Arial, sans-serif;
    line-height: 40px;
    text-align: center;
    vertical-align: middle;
}

.preview-close-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #fff;
    color: #fff;
    transform: scale(1.1);
}

.preview-image {
    max-width: 70vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 20px;
    border: 4px solid #ffd700;
    box-shadow: 
        0 0 30px rgba(0,0,0,0.8),
        0 0 60px rgba(255, 215, 0, 0.3);
    object-fit: contain;
}

/* Coming Soon Popup */
.coming-soon-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coming-soon-popup.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.popup-content {
    background: rgba(26, 26, 26, 0.95);
    border: 3px solid #ffd700;
    border-radius: 20px;
    padding: 30px 40px;
    text-align: center;
    max-width: 400px;
    box-shadow: 
        0 0 30px rgba(0,0,0,0.8),
        0 0 60px rgba(255, 215, 0, 0.2);
}

.popup-content h3 {
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.popup-content p {
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* Hamburger Menu Button */
.hamburger-menu {
    position: absolute;
    top: 40px;
    left: 20px;
    z-index: 1600;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
}

.sidebar.open ~ .hamburger-menu {
    opacity: 0;
    pointer-events: none;
}

.hamburger-menu:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #fff;
    transform: scale(1.05);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: #ffd700;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: 
        linear-gradient(135deg, rgba(26, 26, 26, 1) 0%, rgba(45, 45, 45, 1) 100%);
    border-right: 3px solid #ffd700;
    z-index: 1500;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 5px 0 20px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid #ffd700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.sidebar-close {
    background: none;
    border: 2px solid #ffd700;
    color: #ffd700;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.sidebar-close:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #fff;
    color: #fff;
}

.sidebar-items {
    padding: 20px 0;
    flex-shrink: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 15px 16px;
    margin: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sidebar-item:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sidebar-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.sidebar-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.sidebar-label {
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
}

.sidebar-desc {
    color: #ffd700;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-style: italic;
}

.sidebar-image {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin-top: auto;
}

.sidebar-image img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 15px;
    border: 2px solid #ffd700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.sidebar-image img:hover {
    border-color: #ffed4a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    transform: scale(1.05);
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Back Button */
.back-to-bodega {
    position: absolute;
    top: 100px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2000;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffd700;
}

.back-to-bodega:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #fff;
    transform: scale(1.05);
}

/* Gallery Responsive Design */
@media only screen and (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .gallery-image {
        height: 200px;
        border-radius: 8px;
    }
    
    .hover-tip {
        font-size: 0.8rem;
        padding: 8px 15px;
        margin: 0 15px 15px 15px;
        border-radius: 8px;
    }
    
    .photo-gallery {
        padding: 10px;
    }
    
    /* Smaller mobile optimization for gallery */
    .carousel-page .bodega-name {
        font-size: 2rem;
    }
    
    .carousel-page .neon-subtitle {
        font-size: 0.8rem;
    }
}

@media only screen and (min-width: 481px) and (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    
    .gallery-image {
        height: 220px;
    }
}

@media only screen and (min-width: 769px) and (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media only screen and (min-width: 1025px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 22px;
    }
}


/* Construction Page - HIDDEN */
.construction-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: 
        linear-gradient(135deg, rgba(44, 24, 16, 0.8) 0%, rgba(74, 44, 23, 0.8) 50%, rgba(61, 36, 20, 0.8) 100%),
        url('../images/backgrounds/rainy nyc.gif') center center / cover no-repeat;
    display: none !important; /* FORCE HIDDEN */
    flex-direction: column;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow-y: auto;
}

.back-button {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 2px solid #ffd700;
    border-radius: 25px;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 210;
}

.back-button:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #fff;
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.back-button:active {
    transform: translateX(-3px) scale(0.98);
}

.construction-content {
    text-align: center;
    color: white;
    padding: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    border: 3px solid #ffd700;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
    max-width: 600px;
    margin: 20px auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.construction-title {
    font-family: 'Fredoka One', cursive;
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ff6b6b;
    text-shadow: 
        0 0 20px #ff6b6b,
        3px 3px 0 #000,
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000;
    animation: constructionGlow 2s ease-in-out infinite alternate;
}

.construction-subtitle {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #ffd700;
    text-shadow: 
        0 0 15px #ffd700,
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
    animation: comingSoonPulse 1.5s ease-in-out infinite alternate;
}

@keyframes constructionGlow {
    0% {
        text-shadow: 
            0 0 20px #ff6b6b,
            3px 3px 0 #000,
            -2px -2px 0 #000,
            2px -2px 0 #000,
            -2px 2px 0 #000;
    }
    100% {
        text-shadow: 
            0 0 30px #ff6b6b,
            0 0 40px #ff6b6b,
            3px 3px 0 #000,
            -2px -2px 0 #000,
            2px -2px 0 #000,
            -2px 2px 0 #000;
    }
}

@keyframes comingSoonPulse {
    0% { 
        transform: scale(1);
        text-shadow: 
            0 0 15px #ffd700,
            2px 2px 0 #000,
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px 1px 0 #000;
    }
    100% { 
        transform: scale(1.05);
        text-shadow: 
            0 0 25px #ffd700,
            0 0 35px #ffd700,
            2px 2px 0 #000,
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px 1px 0 #000;
    }
}

.construction-cat {
    font-size: 5rem;
    margin: 30px 0;
    animation: catBounce 3s ease-in-out infinite;
    filter: drop-shadow(5px 5px 10px rgba(0,0,0,0.7));
}

@keyframes catBounce {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

.construction-tools {
    font-size: 3rem;
    margin-top: 20px;
    animation: toolsShake 4s ease-in-out infinite;
}

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

/* iOS Safari specific fixes */
html {
    height: 100%;
    height: -webkit-fill-available;
}

body {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: fixed;
    width: 100%;
}

.bodega-container {
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* Enhanced Touch Targets and Accessibility */
button, 
.social-handle,
.counter-btn,
.charity-btn,
.board-btn,
.sidebar-item,
.gallery-image {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}


/* Focus Styles for Keyboard Navigation */
button:focus-visible,
.counter-btn:focus-visible,
.charity-btn:focus-visible,
.board-btn:focus-visible,
.sidebar-item:focus {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bodega-name,
    .counter-title,
    .board-title,
    .charity-title {
        text-shadow: 
            2px 2px 0 #000,
            -2px -2px 0 #000,
            2px -2px 0 #000,
            -2px 2px 0 #000;
    }
    
    .community-board,
    .charity-spotlight,
    .counter-display {
        border-width: 4px;
        background: rgba(0, 0, 0, 0.9);
    }
}

/* Welcome Screen Responsive */
@media only screen and (max-width: 480px) {
    .welcome-content {
        padding: 25px 15px;
        max-width: 90%;
    }
    
    .bodega-title {
        font-size: clamp(1.6rem, 6vw, 2rem);
    }
    
    .bodega-subtitle {
        font-size: clamp(0.85rem, 3vw, 1rem);
    }
    
    .welcome-btn {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
        padding: 12px 18px;
    }
}

/* Extra Small Mobile Devices (under 400px) */
@media only screen and (max-width: 399px) {
    .welcome-content {
        padding: 20px 10px;
        max-width: 95%;
    }
    
    .bodega-title {
        font-size: clamp(1.4rem, 7vw, 1.8rem);
        margin-bottom: 8px;
    }
    
    .bodega-subtitle {
        font-size: clamp(0.75rem, 4vw, 0.9rem);
        margin-bottom: 15px;
    }
    
    .welcome-btn {
        font-size: clamp(0.8rem, 4.5vw, 1rem);
        padding: 10px 15px;
        min-width: 140px;
    }
    
    .social-links {
        margin-top: 15px;
    }
    
    .social-text {
        font-size: 0.75rem;
    }
    
    .social-handle {
        font-size: 0.8rem;
    }
    
    /* Main Bodega Layout for Extra Small Screens */
    .bodega-name {
        font-size: 1.8rem !important;
        margin-bottom: 5px;
    }
    
    .neon-subtitle {
        font-size: 0.7rem;
    }
    
    .main-content-wrapper {
        padding: 10px !important;
        gap: 15px !important;
    }
    
    .counter-display {
        padding: 15px !important;
        margin: 0 5px;
    }
    
    .counter-title {
        font-size: 1rem !important;
    }
    
    .price-value {
        font-size: 1.2rem !important;
    }
    
    .price-change {
        font-size: 0.8rem !important;
    }
    
    .counter-btn {
        font-size: 0.8rem !important;
        padding: 10px 15px !important;
        margin: 5px 0;
    }
    
    .wallet-box {
        padding: 10px !important;
        margin: 5px;
    }
    
    .wallet-title {
        font-size: 0.8rem !important;
    }
    
    .wallet-address {
        font-size: 0.75rem !important;
    }
    
    /* Charity Section for Extra Small */
    .charity-title {
        font-size: 0.9rem !important;
    }
    
    .charity-tagline {
        font-size: 0.7rem !important;
    }
    
    .stat-number {
        font-size: 1rem !important;
    }
    
    .stat-label {
        font-size: 0.65rem !important;
    }
    
    .charity-mission p {
        font-size: 0.75rem !important;
    }
    
    .highlight-tag {
        font-size: 0.65rem !important;
        padding: 2px 6px !important;
    }
    
    .charity-btn {
        font-size: 0.75rem !important;
        padding: 8px 12px !important;
    }
    
    /* Game Container for Extra Small */
    .game-container {
        margin: 10px 5px !important;
    }
    
    .game-wrapper {
        height: 120px !important;
    }
    
    #gameCanvas {
        width: 100% !important;
        height: 120px !important;
        max-width: calc(100vw - 20px) !important;
    }
    
    .game-score-overlay {
        font-size: 0.8rem !important;
    }
    
    /* Bottom elements for Extra Small */
    .scrolling-text {
        font-size: 0.7rem !important;
    }
    
    /* Hide ALL back buttons on extra small mobile too */
    .back-to-welcome,
    .back-to-bodega,
    button[onclick*="goBackTo"] {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Sidebar optimizations for extra small screens */
    .sidebar {
        width: 85% !important;
        max-width: 280px !important;
    }
    
    .sidebar-header h3 {
        font-size: 1rem !important;
    }
    
    .sidebar-item {
        padding: 12px 15px !important;
        min-height: 44px !important;
    }
    
    .sidebar-icon {
        font-size: 1rem !important;
    }
    
    .sidebar-label {
        font-size: 0.8rem !important;
    }
    
    .sidebar-desc {
        font-size: 0.65rem !important;
    }
    
    .sidebar-image img {
        max-height: 60px !important;
    }
    
    /* Hamburger menu for extra small */
    .hamburger-menu {
        top: 10px !important;
        left: 10px !important;
        width: 32px !important;
        height: 32px !important;
        z-index: 2000 !important;
    }
    
    .hamburger-line {
        height: 2px !important;
    }
}

@media only screen and (min-width: 481px) and (max-width: 768px) {
    .welcome-content {
        padding: 30px 20px;
        max-width: 450px;
    }
    
    .bodega-title {
        font-size: clamp(2rem, 5vw, 2.4rem);
    }
}

/* Landscape Orientation Optimizations */
@media only screen and (max-height: 600px) and (orientation: landscape) {
    .welcome-content {
        padding: 15px 20px;
        max-height: 80vh;
    }
    
    .bodega-title {
        font-size: clamp(1.4rem, 4vh, 1.8rem);
        margin-bottom: 8px;
    }
    
    .bodega-subtitle {
        font-size: clamp(0.8rem, 2.5vh, 1rem);
        margin-bottom: 15px;
    }
    
    .welcome-btn {
        padding: 10px 16px;
        margin-bottom: 10px;
    }
    
    .construction-content {
        padding: 15px;
    }
    
    /* Mobile landscape optimizations for main content */
    .main-content-wrapper {
        padding: 10px !important;
        gap: 15px !important;
    }
    
    .counter-display {
        padding: 15px !important;
    }
    
    .bodega-main {
        padding-bottom: 60px !important;
    }
    
    .charity-content {
        padding: 10px !important;
    }
    
    .construction-title {
        font-size: clamp(1.5rem, 5vh, 2.5rem);
    }
    
    .construction-subtitle {
        font-size: clamp(1.2rem, 4vh, 2rem);
    }
}



/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .bodega-container {
        background-image: url('../images/backgrounds/BodegaKitty3.webp');
        background-size: cover;
        background-position: center 13%;
        background-repeat: no-repeat;
    }
}

/* Safe area handling for notched devices */
@supports (padding: max(0px)) {
    .welcome-overlay {
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    .construction-overlay {
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    .back-button {
        top: max(15px, env(safe-area-inset-top) + 15px);
        left: max(15px, env(safe-area-inset-left) + 15px);
    }
    
    .art-credit {
        bottom: max(15px, env(safe-area-inset-bottom) + 15px);
    }
}

/* Safari and Edge Browser Fixes */
@supports (-webkit-appearance: none) {
    /* Force Safari to respect viewport */
    html {
        -webkit-text-size-adjust: 100%;
    }
    
    body {
        -webkit-overflow-scrolling: touch;
        -webkit-font-smoothing: antialiased;
    }
    
    /* Fix game canvas cutoff in Safari/Edge on mobile only */
    @media only screen and (max-width: 480px) {
        .game-container {
            margin: 0 !important;
            padding: 0 !important;
            display: none !important;
            height: 0 !important;
        }
        
        .game-wrapper {
            overflow: visible !important;
            display: none !important;
        }
    }
    
    #gameCanvas {
        display: block !important;
        margin: 0 auto !important;
    }
    
    /* Fix iOS media query issues */
    @media only screen and (max-width: 768px) {
        .bodega-container {
            min-height: -webkit-fill-available;
            height: -webkit-fill-available;
        }
        
        .bodega-main {
            min-height: -webkit-fill-available;
            height: -webkit-fill-available;
        }
    }
    
    /* iOS specific mobile styles */
    @media only screen and (max-width: 399px) {
        * {
            -webkit-tap-highlight-color: transparent;
        }
        
        .welcome-content {
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
        
        .counter-display,
        .wallet-box,
        .charity-spotlight {
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
    }
}

/* Microsoft Edge Browser Fixes - mobile only */
@supports (-ms-ime-align: auto) {
    @media only screen and (max-width: 480px) {
        .game-container {
            margin: 0 !important;
            padding: 0 !important;
            display: none !important;
            height: 0 !important;
        }
    }
    
    #gameCanvas {
        display: block !important;
        margin: 0 auto !important;
    }
}

