* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    overflow: hidden;
    background: linear-gradient(to bottom, #87CEEB 0%, #4682B4 100%);
    height: 100vh;
    position: relative;
}

#gameContainer {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

#oceanWorld {
    width: 200vw;
    height: 200vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, #5DADE2 0%, #2874A6 50%, #1B4F72 100%);
    transition: transform 0.3s ease-out;
}

#boat {
    position: absolute;
    width: 60px;
    height: 80px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: all 0.3s ease-out;
}

.boat-body {
    width: 60px;
    height: 40px;
    background: #8B4513;
    border-radius: 0 0 30px 30px;
    position: relative;
    border: 3px solid #654321;
}

.boat-body::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 30px;
    background: #654321;
}

.sail {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 35px solid #FFF8DC;
    border-radius: 0 0 15px 15px;
}

.fisherman {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 25px;
    background: #FFB6C1;
    border-radius: 10px 10px 5px 5px;
    border: 2px solid #FF69B4;
}

.fisherman::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #FFB6C1;
    border-radius: 50%;
    border: 2px solid #FF69B4;
}

.fisherman::after {
    content: '';
    position: absolute;
    top: 2px;
    right: -8px;
    width: 8px;
    height: 6px;
    background: #FFB6C1;
    border-radius: 50%;
    border: 2px solid #FF69B4;
}

#fishingRod {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: top center;
    z-index: 5;
    pointer-events: none;
}

.rod-line {
    width: 2px;
    height: 100px;
    background: #8B4513;
    margin: 0 auto;
    position: relative;
}

#magnet {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #FF6B6B 25%, #4ECDC4 25%, #4ECDC4 50%, #FF6B6B 50%, #FF6B6B 75%, #4ECDC4 75%, #4ECDC4);
    border-radius: 50%;
    border: 3px solid #2C3E50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#gameObjects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.fish {
    position: absolute;
    width: 30px;
    height: 20px;
    background: linear-gradient(90deg, #FF6B6B 0%, #FFE66D 50%, #FF6B6B 100%);
    border-radius: 50% 10px 10px 50%;
    border: 2px solid #E74C3C;
    animation: swim 3s ease-in-out infinite;
}

.fish::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 12px solid #FF6B6B;
}

.fish::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 3px;
    width: 4px;
    height: 4px;
    background: #2C3E50;
    border-radius: 50%;
}

@keyframes swim {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.treasure {
    position: absolute;
    width: 25px;
    height: 25px;
    background: #FFD700;
    border-radius: 5px;
    border: 2px solid #FFA500;
    animation: float 2s ease-in-out infinite;
}

.treasure::before {
    content: '💎';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(180deg); }
}

#ui {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

#score {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    background: rgba(0,0,0,0.3);
    padding: 10px 15px;
    border-radius: 20px;
    border: 3px solid #FFD700;
}

#instructions {
    font-size: 14px;
    background: rgba(0,0,0,0.3);
    padding: 8px 12px;
    border-radius: 15px;
    border: 2px solid #87CEEB;
    max-width: 250px;
}

.waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path fill="%234682B4" d="M0,60 C200,20 400,100 600,60 C800,20 1000,100 1200,60 L1200,120 L0,120 Z"/></svg>') repeat-x;
    background-size: 1200px 100px;
    animation: waves 8s linear infinite;
    opacity: 0.7;
}

@keyframes waves {
    0% { background-position-x: 0; }
    100% { background-position-x: 1200px; }
}

@media (max-width: 768px) {
    #instructions {
        font-size: 12px;
        max-width: 200px;
    }
    
    #score {
        font-size: 20px;
    }
}

.start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #87CEEB 0%, #4682B4 50%, #1E90FF 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    flex-direction: column;
}

.start-content {
    text-align: center;
    color: white;
    padding: 20px;
    max-width: 90%;
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    border: 3px solid #FFD700;
    backdrop-filter: blur(10px);
}

.start-content h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.instructions {
    margin: 20px 0;
    font-size: 1.1em;
    line-height: 1.6;
}

.instructions p {
    margin: 8px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.start-button {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: none;
    padding: 15px 30px;
    font-size: 1.3em;
    font-weight: bold;
    color: #2C3E50;
    border-radius: 25px;
    cursor: pointer;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    border: 3px solid #FF8C00;
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.start-button:active {
    transform: translateY(0);
}

.controls-info {
    margin-top: 20px;
    font-size: 0.9em;
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 15px;
    border: 2px solid #87CEEB;
}

.controls-info p {
    margin: 5px 0;
}

.orientation-status {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid #FFD700;
    border-radius: 15px;
    color: #FFD700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.location-status {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 255, 127, 0.2);
    border: 2px solid #00FF7F;
    border-radius: 15px;
    color: #00FF7F;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    animation: pulse 2s ease-in-out infinite;
}