body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: url('img/img_pollo_locco/wüstenbackground.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 0;
    margin: 0;
    height: 100vh;
    overflow-x: hidden;
}

.mexican-section {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
}

canvas {
    background: url('img/img_pollo_locco/wüstenbackground.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    max-width: 100%;
    height: auto;
    display: block;
}

.mexican-title {
    font-size: 4rem;
    color: #e63946;
    text-shadow:
        2px 2px 0 #fff700,
        4px 4px 0 #43aa8b,
        6px 6px 0 #f3722c;
    font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif;
    letter-spacing: 4px;
    border: 4px solid #43aa8b;
    border-radius: 18px;
    padding: 20px 40px;
    background: linear-gradient(90deg, #fff700 0%, #e63946 50%, #43aa8b 100%);
    display: inline-block;
    margin: 30px auto 20px auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: shake 1.2s infinite alternate;
}

@keyframes shake {
    0% {
        transform: rotate(-2deg) scale(1.03);
    }
    100% {
        transform: rotate(2deg) scale(1);
    }
}

.button-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
    align-items: center;
}

.pause-button, .fullscreen-button {
    font-size: 1.5rem;
    color: #fff;
    background: linear-gradient(45deg, #e63946, #f77f00);
    border: 3px solid #43aa8b;
    border-radius: 15px;
    padding: 10px 20px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.pause-button:hover, .fullscreen-button:hover {
    background: linear-gradient(45deg, #f77f00, #e63946);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.pause-button:active, .fullscreen-button:active {
    transform: scale(0.95);
}

.pause-button.paused {
    background: linear-gradient(45deg, #43aa8b, #277da1);
}

.fullscreen-button {
    background: linear-gradient(45deg, #277da1, #43aa8b);
}

.fullscreen-button:hover {
    background: linear-gradient(45deg, #43aa8b, #277da1);
}

.fullscreen-button.active {
    background: linear-gradient(45deg, #f77f00, #e63946);
}

/* Fullscreen canvas styling */
canvas.fullscreen {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(var(--scale-factor, 1.5)) !important;
    z-index: 9999 !important;
    background: linear-gradient(to bottom, #87ceeb 40%, #bfa16b 70%, #994409 100%) !important;
}

/* Hide other elements in fullscreen */
body.fullscreen-active .mexican-title,
body.fullscreen-active .button-container,
body.fullscreen-active #brownGround {
    display: none !important;
}

body.fullscreen-active .mexican-section {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    height: 100% !important;
}

body.fullscreen-active {
    overflow: hidden;
    background: black;
}

#pauseButton:focus {
    outline: none;
}

/* Start Screen Specific Styles */
canvas {
    cursor: default;
    user-select: none;
    touch-action: none; /* Prevent browser handling of touch events */
    -webkit-touch-callout: none; /* Disable iOS callout on long-press */
    -webkit-tap-highlight-color: rgba(0,0,0,0); /* Remove tap highlight on mobile */
}

canvas:hover {
    cursor: pointer; /* Will be overridden by StartScreen class based on hover state */
}

/* Show mobile controls on mobile devices */
@media (max-width: 768px) {
    .mobile-controls {
        display: flex;
    }
    
    /* Hide control instructions on mobile */
    .controls-info {
        display: none !important;
    }
    
    .mexican-title {
        font-size: 2.5rem;
        padding: 15px 25px;
        margin: 15px auto 10px auto;
    }
    
    canvas {
        max-width: 95vw;
        height: auto;
    }
}

/* Show orientation message on mobile portrait */
@media (max-width: 768px) and (orientation: portrait) {
    .orientation-overlay {
        display: flex !important;
    }
    
    .mexican-section {
        display: none;
    }
    
    #brownGround {
        display: none;
    }
}

/* Responsive Canvas for Mobile Landscape */
@media screen and (max-width: 768px) and (orientation: landscape) {
    body, html {
        height: 100vh;
        width: 100vw;
        margin: 0;
        padding: 0;
        overflow: hidden;
        background-color: black;
    }
    
    .mexican-section {
        width: 100vw;
        height: 100vh;
        padding: 0;
        margin: 0;
    }


    
    .mexican-title {
        display: none;
    }
    
    canvas {
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        border-radius: 0;
        object-fit: fill;
    }
    
    #brownGround {
        display: none;
    }
    
    .mobile-controls {
        bottom: 10px;
        padding: 0 15px;
        z-index: 10000;
    }
    
    .control-btn {
        opacity: 0.8;
    }
    
    .movement-btn {
        width: 70px;
        height: 70px;
    }
    
    .action-btn {
        width: 90px;
        height: 60px;
    }
    
    .btn-text {
        font-size: 14px;
    }
}

/* Extra responsive for very small screens */
@media screen and (max-width: 480px) and (orientation: landscape) {
    .mexican-title {
        font-size: 1.4rem;
        padding: 5px 10px;
        margin: 3px auto;
    }
    
    canvas {
        height: calc(100vh - 40px);
    }
    
 .controls-info {
        display: none !important;
    }

    .mobile-controls {
        bottom: 5px;
        padding: 0 10px;
    }
    
    .movement-btn {
        width: 45px;
        height: 45px;
    }
    
    .action-btn {
        width: 60px;
        height: 35px;
    }
    
    .btn-icon {
        font-size: 20px;
    }
    
    .btn-text {
        font-size: 10px;
    }
}

/* Large mobile screens landscape */
@media screen and (min-width: 481px) and (max-width: 768px) and (orientation: landscape) {
    canvas {
        height: calc(100vh - 70px);
    }
    
    .mexican-title {
        font-size: 2rem;
    }
}

/* Portrait orientation adjustments */
@media screen and (max-width: 768px) and (orientation: portrait) {
    body, html {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        background-color: black;
    }
    
    .mexican-section {
        padding: 0;
        margin: 0;
        width: 100vw;
        height: 100vh;
    }
    
    canvas {
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        border-radius: 0;
        object-fit: fill;
        background-color: black;
    }
    
    .mexican-title {
        display: none;
    }
    
    #brownGround {
        display: none;
    }
    
    .mobile-controls {
        bottom: 20px;
        z-index: 10000;
    }
}

/* Control instructions styling */
.controls-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 15px;
    background: linear-gradient(90deg, #8B4513, #D2691E, #8B4513);
    border: 3px solid #654321;
    border-radius: 10px;
    margin: 10px auto;
    max-width: 800px;
    font-family: 'Bangers', cursive;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.control-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FFF8DC;
    font-size: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.control-key {
    background: #654321;
    color: #FFF8DC;
    padding: 6px 12px;
    border: 2px solid #8B4513;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    min-width: 24px;
    text-align: center;
}

/* Info button styling */
.info-button {
    position: relative;
    margin-left: 20px;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #FF6B35;
    color: white;
    border-radius: 50%;
    border: 2px solid #D2691E;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.info-icon:hover {
    background: #FF8C42;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.info-tooltip {
    position: absolute;
    bottom: 45px;
    right: -150px;
    width: 350px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: #FFF8DC;
    padding: 20px;
    border-radius: 15px;
    border: 3px solid #654321;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s ease;
    z-index: 100000 !important;
    font-family: 'Bangers', cursive;
    font-size: 14px;
    line-height: 1.4;
}

.info-button:hover .info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.info-tooltip h3 {
    margin: 0 0 15px 0;
    color: #FFD700;
    text-align: center;
    font-size: 18px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.info-tooltip p {
    margin: 10px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.info-tooltip strong {
    color: #FFD700;
}

.info-tooltip em {
    color: #FF6B35;
    font-style: italic;
    text-align: center;
    display: block;
    margin-top: 15px;
    font-size: 16px;
}

/* Arrow for tooltip */
.info-tooltip::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 170px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #654321;
}

/* Mobile orientation overlay */
.orientation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.orientation-content {
    text-align: center;
    color: #FFF8DC;
    padding: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 3px solid #654321;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.phone-rotate-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.orientation-content h2 {
    font-size: 2.5rem;
    color: #FFD700;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.orientation-content p {
    font-size: 1.2rem;
    margin: 20px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    line-height: 1.4;
}

.rotate-animation {
    font-size: 2rem;
    margin-top: 30px;
    animation: rotate 2s linear infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

/* Responsive design for controls */
@media (max-width: 768px) {
    .controls-info {
        display: none;
    }
    
    .info-tooltip {
        width: 280px;
        right: -120px;
        font-size: 12px;
        padding: 15px;
    }
    
    .info-tooltip h3 {
        font-size: 16px;
    }
    
    .info-tooltip::after {
        right: 140px;
    }
}

/* Impressum Footer */
.impressum-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.438);
    padding: 10px;
    text-align: center;
    z-index: 1000;
}

.impressum-link {
    color: #fff700;
    text-decoration: none;
    font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif;
    font-size: 14px;
    transition: color 0.3s ease;
    margin: 0 10px;
}

.impressum-link:hover {
    color: #e63946;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.footer-separator {
    color: #fff700;
    font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif;
    font-size: 14px;
}

/* Hide impressum footer at screen heights of 740px and below */
@media screen and (max-height: 740px) {
    .impressum-footer {
        display: none;
    }
}

/* Impressum Page Styles */
.impressum-page {
    background: linear-gradient(to bottom, #87ceeb 40%, #bfa16b 70%, #994409 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    min-height: 100vh;
    height: 100%;
    padding: 40px 20px;
    margin: 0;
    font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif;
}

.impressum-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.impressum-title {
    color: #e63946;
    text-align: center;
    font-size: 3rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.impressum-content {
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

.impressum-content h2 {
    color: #43aa8b;
    border-bottom: 2px solid #43aa8b;
    padding-bottom: 5px;
    margin-top: 30px;
}

.back-button {
    display: inline-block;
    background: linear-gradient(90deg, #fff700 0%, #e63946 50%, #43aa8b 100%);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    margin-top: 30px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

