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

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

body {
    font-family: 'Inter', 'Arial', sans-serif;
    background: linear-gradient(135deg, #2d5016 0%, #4a8c3a 50%, #6bcc5a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 10px;
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.back-home-link {
    display: inline-block;
    margin-bottom: 10px;
    color: #4a9eff;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 10px;
    font-size: 0.9em;
    transition: background 0.3s ease, transform 0.2s ease;
}

.back-home-link:hover {
    background: rgba(74, 158, 255, 0.2);
    transform: translateX(-3px);
}

.header {
    text-align: center;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 12px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #2d5016 0%, #4a8c3a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.game-notice {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 10px 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.notice-icon {
    font-size: 1.5rem;
}

.notice-text {
    color: #0f172a;
    font-size: 0.9rem;
}

.instructions-panel {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.instructions-panel h3 {
    font-size: 1.5rem;
    color: #2d5016;
    margin-bottom: 12px;
    text-align: center;
}

.instructions-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.instruction-section {
    background: rgba(45, 80, 22, 0.05);
    border-radius: 15px;
    padding: 12px;
    border-left: 4px solid #4a8c3a;
}

.instruction-section h4 {
    font-size: 1.1rem;
    color: #2d5016;
    margin-bottom: 8px;
    font-weight: 600;
}

.instruction-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instruction-section li {
    color: #0f172a;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
}

.instruction-section li:before {
    content: "•";
    color: #4a8c3a;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.instruction-section li:last-child {
    margin-bottom: 0;
}

.fullscreen-btn {
    display: none; /* Hidden since game is always fullscreen only */
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin-left: -50px; /* Offset to position before center */
    z-index: 10002; /* Higher than overlay to stay visible */
    background: rgba(45, 80, 22, 0.8);
    color: white;
    border: 2px solid #4a8c3a;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: rgba(45, 80, 22, 1);
    transform: translateX(-50%) scale(1.1);
}

/* Ensure buttons are visible in fullscreen */
:fullscreen .fullscreen-btn,
:-webkit-full-screen .fullscreen-btn,
:-moz-full-screen .fullscreen-btn {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin-left: -50px;
    z-index: 10002;
}

.run-walk-btn {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 50px; /* Offset to position after center */
    z-index: 10002; /* Higher than overlay to stay visible */
    background: rgba(45, 80, 22, 0.8);
    color: white;
    border: 2px solid #4a8c3a;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.run-walk-btn:hover {
    background: rgba(45, 80, 22, 1);
    transform: translateX(-50%) scale(1.1);
}

.run-walk-btn.running {
    background: rgba(139, 0, 0, 0.8);
    border-color: #8B0000;
}

.run-walk-btn.running:hover {
    background: rgba(139, 0, 0, 1);
}

/* Ensure buttons are visible in fullscreen */
:fullscreen .run-walk-btn,
:-webkit-full-screen .run-walk-btn,
:-moz-full-screen .run-walk-btn {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 50px;
    z-index: 10002;
}

.game-area {
    position: relative;
}

/* HUD Styles */
.hud {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    min-width: 200px;
    backdrop-filter: blur(5px);
    display: none; /* Hidden by default, shown when playing */
    pointer-events: none; /* Allow clicks to pass through to game */
}

/* Ensure HUD is visible in fullscreen */
:fullscreen .hud,
:-webkit-full-screen .hud,
:-moz-full-screen .hud {
    position: fixed;
    z-index: 10000;
    display: block !important;
}

.hud-stat {
    margin-bottom: 12px;
}

.hud-stat:last-child {
    margin-bottom: 0;
}

.hud-label {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hud-bar-container {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hud-bar {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 8px;
}

.hunger-bar {
    background: linear-gradient(90deg, #ff6b6b 0%, #ee5a6f 100%);
}

.thirst-bar {
    background: linear-gradient(90deg, #4ecdc4 0%, #44a3a0 100%);
}

.stamina-bar {
    background: linear-gradient(90deg, #95e1d3 0%, #7dd3c1 100%);
}

.hud-value {
    color: #fff;
    font-size: 0.85rem;
    margin-top: 3px;
    text-align: right;
    font-weight: 600;
}

/* Captured Animals HUD */
.captured-animals-hud {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    min-width: 200px;
    max-width: 250px;
    backdrop-filter: blur(5px);
    display: none;
    pointer-events: none;
}

.captured-animals-hud .hud-label {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 8px;
}

.captured-animals-list {
    max-height: 200px;
    overflow-y: auto;
}

.captured-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: #fff;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.captured-item:last-child {
    border-bottom: none;
}

.captured-emoji {
    font-size: 1.2rem;
}

.captured-name {
    flex: 1;
    text-transform: capitalize;
}

.captured-count {
    font-weight: 600;
    color: #4ecdc4;
}

.captured-empty {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-align: center;
    padding: 10px 0;
    font-style: italic;
}

.npc-hint {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    color: #4ecdc4;
    font-size: 0.75rem;
    text-align: center;
    font-weight: 600;
}

/* Ensure captured animals HUD is visible in fullscreen */
:fullscreen .captured-animals-hud,
:-webkit-full-screen .captured-animals-hud,
:-moz-full-screen .captured-animals-hud {
    position: fixed;
    top: 10px; /* Same top as buttons, but to the right */
    right: 10px;
    z-index: 10000;
    display: block !important;
}

/* Capture Mouse Overlay */
.capture-mouse-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: pointer;
    backdrop-filter: blur(5px);
    pointer-events: auto;
}

.capture-mouse-message {
    background: rgba(45, 80, 22, 0.95);
    padding: 30px 50px;
    border-radius: 20px;
    text-align: center;
    border: 3px solid #4a8c3a;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.capture-mouse-message h3 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.capture-mouse-message p {
    color: #e0e0e0;
    font-size: 1.2rem;
    margin: 0;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Ensure overlay is visible in fullscreen */
:fullscreen .capture-mouse-overlay,
:-webkit-full-screen .capture-mouse-overlay,
:-moz-full-screen .capture-mouse-overlay {
    position: fixed;
    z-index: 2000;
}

@media (max-width: 768px) {
    .instructions-content {
        grid-template-columns: 1fr;
    }
    
    .instructions-panel {
        padding: 15px;
    }
    
    .instructions-panel h3 {
        font-size: 1.25rem;
    }
    
    .hud {
        min-width: 150px;
        padding: 10px;
    }
    
    .hud-label {
        font-size: 0.8rem;
    }
    
    .hud-bar-container {
        height: 16px;
    }
}

.game-wrapper {
    display: none; /* Hidden by default, shown when fullscreen */
    gap: 20px;
    align-items: flex-start;
}

.game-area {
    flex: 1;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#gameContainer {
    display: block;
    width: 100%;
    max-width: 900px;
    height: 600px;
    min-height: 400px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background: #87CEEB; /* Sky blue background - visible if canvas doesn't render */
}

#gameContainer canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 15px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Fullscreen styles */
:fullscreen #gameContainer,
:-webkit-full-screen #gameContainer,
:-moz-full-screen #gameContainer {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    border-radius: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
}

:fullscreen .game-area,
:-webkit-full-screen .game-area,
:-moz-full-screen .game-area {
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    max-width: none !important;
    background: #87CEEB !important; /* Match game sky color */
    box-shadow: none !important;
    border: none !important;
}

:fullscreen .game-wrapper,
:-webkit-full-screen .game-wrapper,
:-moz-full-screen .game-wrapper {
    display: flex !important; /* Show game when fullscreen */
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

:fullscreen body,
:-webkit-full-screen body,
:-moz-full-screen body {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

:fullscreen .game-container,
:-webkit-full-screen .game-container,
:-moz-full-screen .game-container {
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

/* Canvas styles are defined above in #gameContainer canvas */

.hunt-list-panel {
    width: 280px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-height: 650px;
    overflow-y: auto;
}

.panel-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(45, 80, 22, 0.2);
}

.panel-header h2 {
    font-size: 1.5rem;
    color: #2d5016;
    margin-bottom: 8px;
}

.level-info {
    font-size: 1rem;
    color: #4a8c3a;
    font-weight: 600;
}

.hunt-list {
    margin-bottom: 20px;
}

.hunt-item {
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(45, 80, 22, 0.05);
    border-radius: 10px;
    border-left: 4px solid #4a8c3a;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hunt-item:hover {
    background: rgba(45, 80, 22, 0.1);
    transform: translateX(5px);
}

.hunt-item.completed {
    background: rgba(74, 140, 58, 0.15);
    border-left-color: #6bcc5a;
    opacity: 0.7;
}

.hunt-item-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.hunt-item.completed .hunt-item-name {
    text-decoration: line-through;
    color: #666;
}

.hunt-item-count {
    font-size: 0.9rem;
    color: #4a8c3a;
    font-weight: 600;
}

.hunt-item.completed .hunt-item-count {
    color: #6bcc5a;
}

.game-stats {
    padding-top: 15px;
    border-top: 2px solid rgba(45, 80, 22, 0.2);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 1rem;
}

.stat-label {
    color: #0f172a;
    font-weight: 600;
}

.stat-item span:last-child {
    color: #4a8c3a;
    font-weight: 700;
}

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

.overlay-content {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
}

.overlay-content h2 {
    text-align: center;
}

.overlay-content h2 {
    font-size: 2rem;
    color: #2d5016;
    margin-bottom: 15px;
}

.overlay-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
    text-align: center;
}

.overlay-instructions {
    margin: 25px 0;
    text-align: left;
}

.overlay-instruction-section {
    margin-bottom: 20px;
    background: rgba(45, 80, 22, 0.05);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #4a8c3a;
}

.overlay-instruction-section h4 {
    color: #2d5016;
    font-size: 1.1rem;
    margin-bottom: 10px;
    margin-top: 0;
}

.overlay-instruction-section ul {
    margin: 0;
    padding-left: 20px;
    color: #333;
    line-height: 1.8;
}

.overlay-instruction-section li {
    margin-bottom: 6px;
}

.overlay-instruction-section strong {
    color: #2d5016;
}

.overlay-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
    text-align: center;
}

.game-button {
    padding: 12px 35px;
    background: linear-gradient(135deg, #2d5016 0%, #4a8c3a 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(45, 80, 22, 0.3);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 80, 22, 0.4);
}

.game-button.back-button {
    background: linear-gradient(135deg, #666 0%, #888 100%);
    box-shadow: 0 4px 15px rgba(102, 102, 102, 0.3);
}

.game-button.back-button:hover {
    box-shadow: 0 6px 20px rgba(102, 102, 102, 0.4);
}

.game-button:active {
    transform: translateY(0);
}

@media (max-width: 1200px) {
    .game-wrapper {
        flex-direction: column;
    }

    .hunt-list-panel {
        width: 100%;
        max-height: none;
    }

    #gameCanvas {
        max-width: 100%;
        height: 500px;
    }
}

@media (max-width: 768px) {
    #gameCanvas {
        height: 400px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .hunt-list-panel {
        padding: 15px;
    }

    .panel-header h2 {
        font-size: 1.25rem;
    }
}

/* Touch Controls for Mobile */
.touch-controls {
    display: none; /* Hidden by default, shown on touch devices */
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.touch-controls.active {
    display: block;
}

/* Virtual Joystick */
.joystick {
    position: absolute;
    pointer-events: auto;
}

.movement-joystick {
    bottom: 20px;
    left: 20px;
    width: 120px;
    height: 120px;
}

.joystick-base {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.8);
    position: absolute;
    top: 0;
    left: 0;
}

.joystick-handle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.joystick.active .joystick-handle {
    transition: none;
}

/* Touch Buttons */
.touch-buttons {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: auto;
}

.touch-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(45, 80, 22, 0.9);
    border: 3px solid #4a8c3a;
    color: white;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.1s;
}

.touch-button:active {
    transform: scale(0.9);
    background: rgba(45, 80, 22, 1);
}

.attack-button {
    background: rgba(139, 0, 0, 0.9);
    border-color: #8B0000;
}

.attack-button:active {
    background: rgba(139, 0, 0, 1);
}

.run-button {
    background: rgba(45, 80, 22, 0.9);
    border-color: #4a8c3a;
}

.run-button.running {
    background: rgba(139, 0, 0, 0.9);
    border-color: #8B0000;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .overlay-content {
        max-width: 95vw;
        padding: 25px 20px;
        max-height: 95vh;
    }
    
    .overlay-instruction-section {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .overlay-instruction-section h4 {
        font-size: 1rem;
    }
    
    .overlay-instruction-section ul {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    .overlay-buttons {
        gap: 10px;
    }
    
    .game-button {
        padding: 10px 28px;
        font-size: 1rem;
    }
    
    .touch-controls {
        display: block;
    }
    
    .fullscreen-btn,
    .run-walk-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
        top: 5px;
    }
    
    .hud {
        font-size: 0.65rem;
        padding: 6px 8px;
        min-width: 110px;
        max-width: 130px;
        top: 5px;
        left: 5px;
        border-radius: 8px;
    }
    
    .hud-stat {
        margin-bottom: 4px;
    }
    
    .hud-stat:last-child {
        margin-bottom: 0;
    }
    
    .hud-label {
        font-size: 0.65rem;
        margin-bottom: 2px;
        letter-spacing: 0.3px;
    }
    
    .hud-bar-container {
        height: 12px;
        border-width: 1px;
        border-radius: 6px;
    }
    
    .hud-value {
        font-size: 0.65rem;
        margin-top: 1px;
    }
    
    .captured-animals-hud {
        font-size: 0.6rem;
        min-width: 110px;
        max-width: 130px;
        padding: 6px 8px;
        top: 5px;
        right: 5px;
        border-radius: 8px;
    }
    
    .captured-animals-hud .hud-label {
        font-size: 0.6rem;
        margin-bottom: 6px;
    }
    
    .captured-item {
        font-size: 0.6rem;
        padding: 3px 0;
    }
    
    .npc-hint {
        font-size: 0.55rem;
        margin-top: 6px;
    }
    
    .instructions-panel {
        font-size: 0.85rem;
        padding: 10px;
    }
}

/* Landscape orientation on mobile - make HUD much smaller */
@media (max-width: 768px) and (orientation: landscape) {
    .hud {
        font-size: 0.5rem !important;
        padding: 4px 5px !important;
        min-width: 85px !important;
        max-width: 100px !important;
        top: 2px !important;
        left: 2px !important;
    }
    
    .hud-stat {
        margin-bottom: 2px !important;
    }
    
    .hud-stat:last-child {
        margin-bottom: 0 !important;
    }
    
    .hud-label {
        font-size: 0.5rem !important;
        margin-bottom: 1px !important;
        letter-spacing: 0.1px !important;
    }
    
    .hud-bar-container {
        height: 8px !important;
        border-width: 1px !important;
        border-radius: 4px !important;
    }
    
    .hud-value {
        font-size: 0.5rem !important;
        margin-top: 0px !important;
    }
    
    .captured-animals-hud {
        font-size: 0.45rem !important;
        min-width: 85px !important;
        max-width: 100px !important;
        padding: 4px 5px !important;
        top: 2px !important;
        right: 2px !important;
    }
    
    .captured-animals-hud .hud-label {
        font-size: 0.45rem !important;
        margin-bottom: 3px !important;
    }
    
    .captured-item {
        font-size: 0.45rem !important;
        padding: 1px 0 !important;
    }
    
    .captured-empty {
        font-size: 0.45rem !important;
    }
    
    .npc-hint {
        font-size: 0.42rem !important;
        margin-top: 3px !important;
    }
    
    .fullscreen-btn,
    .run-walk-btn {
        font-size: 0.65rem !important;
        padding: 4px 6px !important;
        top: 2px !important;
    }
}

/* Alternative landscape detection using max-height */
@media (max-width: 768px) and (max-height: 500px) {
    .hud {
        font-size: 0.5rem !important;
        padding: 4px 5px !important;
        min-width: 85px !important;
        max-width: 100px !important;
        top: 2px !important;
        left: 2px !important;
    }
    
    .hud-stat {
        margin-bottom: 2px !important;
    }
    
    .hud-label {
        font-size: 0.5rem !important;
        margin-bottom: 1px !important;
    }
    
    .hud-bar-container {
        height: 8px !important;
    }
    
    .hud-value {
        font-size: 0.5rem !important;
    }
    
    .captured-animals-hud {
        font-size: 0.45rem !important;
        min-width: 85px !important;
        max-width: 100px !important;
        padding: 4px 5px !important;
        top: 2px !important;
        right: 2px !important;
    }
    
    .captured-animals-hud .hud-label {
        font-size: 0.45rem !important;
    }
    
    .captured-item {
        font-size: 0.45rem !important;
    }
    
    .npc-hint {
        font-size: 0.42rem !important;
    }
    
    .fullscreen-btn,
    .run-walk-btn {
        font-size: 0.65rem !important;
        padding: 4px 6px !important;
        top: 2px !important;
    }
    
    .joystick {
        width: 100px;
        height: 100px;
    }
    
    .joystick-handle {
        width: 40px;
        height: 40px;
    }
    
    .touch-button {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .movement-joystick {
        bottom: 10px;
        left: 10px;
        width: 90px;
        height: 90px;
    }
    
    .joystick-handle {
        width: 35px;
        height: 35px;
    }
    
    .touch-buttons {
        bottom: 10px;
        right: 10px;
        gap: 10px;
    }
    
    .touch-button {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
}


