/* Secret Game - platform game styles */

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Open Sans', sans-serif;
    overflow: hidden;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 50%, #8FBC8F 100%);
    overflow: hidden;
}

.game-world {
    position: absolute;
    width: 7200px;
    height: 600px;
    transform-origin: 0 0;
    top: 50%;
    margin-top: -300px;
}

.game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    font-size: 18px;
}

.game-ui div {
    margin-bottom: 10px;
}

.game-ui-tooltip {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 6px;
}

.game-ui-tooltip kbd {
    padding: 2px 5px;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    font-size: 11px;
}

.player {
    position: absolute;
    width: 30px;
    height: 40px;
    background: linear-gradient(45deg, #FF6B6B, #FFE66D);
    border-radius: 50% 50% 0 0;
    border: 2px solid #333;
    z-index: 10;
    transition: transform 0.1s ease;
}

.player::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 8px;
    width: 14px;
    height: 14px;
    background: #FFB6C1;
    border-radius: 50%;
    border: 1px solid #333;
}

.platform {
    position: absolute;
    background: linear-gradient(to bottom, #8B4513, #A0522D);
    border: 2px solid #654321;
    border-radius: 5px;
    z-index: 5;
}

.goal {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #FFD700, #FFA500);
    border: 3px solid #FF8C00;
    border-radius: 50%;
    z-index: 8;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

.spike {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #FF0000;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    z-index: 6;
}

.obstacle {
    position: absolute;
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    border: 2px solid #922b21;
    border-radius: 4px;
    z-index: 6;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.3);
}

.powerup {
    position: absolute;
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 30% 30%, #7fff7f, #228b22);
    border: 2px solid #006400;
    border-radius: 50%;
    z-index: 7;
    animation: pulse-green 0.8s ease-in-out infinite alternate;
    box-shadow: 0 0 12px rgba(34, 139, 34, 0.6);
}

@keyframes pulse-green {
    0% { transform: scale(1); box-shadow: 0 0 12px rgba(34, 139, 34, 0.6); }
    100% { transform: scale(1.2); box-shadow: 0 0 20px rgba(34, 139, 34, 0.9); }
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    z-index: 200;
    display: none;
}

.game-over h2 {
    font-family: 'Homemade Apple', cursive;
    color: #FF6B6B;
    margin-bottom: 20px;
}

.game-over button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px;
}

.game-over button:hover {
    background: #45a049;
}

.secret-word {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.92);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    z-index: 10000;
    display: none;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.4);
}

.secret-word h2 {
    font-family: 'Homemade Apple', cursive;
    color: #FFD700;
    margin-bottom: 20px;
}

.secret-word .word {
    font-size: 24px;
    font-weight: bold;
    color: #FF6B6B;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    border: 2px solid #FFD700;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    pointer-events: none;
    z-index: 15;
}

.cloud {
    position: absolute;
    background: rgba(255,255,255,0.8);
    border-radius: 50px;
    z-index: 1;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(calc(100vw + 100px)); }
}

.mobile-controls {
    display: none;
    position: absolute;
    bottom: 60px;
    opacity: 0.7;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    z-index: 1000;
    pointer-events: none;
    justify-content: space-between;
    padding: 0 5vw;
}

.mobile-controls .left-group {
    display: flex;
    gap: 16px;
}

.mobile-controls .right-group {
    display: flex;
    gap: 16px;
}

.mobile-controls button {
    pointer-events: auto;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.85);
    font-size: 2.7rem;
    color: #764ba2;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    font-family: inherit;
    font-weight: bold;
    transition: background 0.2s;
}

.mobile-controls button:active {
    background: #FFD700;
}

@media (max-width: 900px) {
    .mobile-controls {
        display: flex !important;
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

@media (max-width: 900px) and (orientation: portrait) {
    .mobile-controls {
        bottom: 120px;
    }
}

html, body {
    overflow: hidden !important;
    height: 100%;
    touch-action: none;
}

.game-container {
    overflow: hidden !important;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
}

.landscape-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    color: #fff;
    z-index: 20000;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.5em;
    padding: 40px 20px;
    cursor: pointer;
}

.landscape-message.visible {
    display: flex;
}

.landscape-message span {
    font-size: 2.5em;
    display: block;
    margin-bottom: 20px;
}
