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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    background: linear-gradient(180deg, #87CEEB 0%, #4682B4 100%);
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#ocean-world {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    transition: transform 0.1s linear;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#ui-overlay > * {
    pointer-events: auto;
}

.stats-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 10px 20px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-icon {
    font-size: 24px;
}

#fishing-line {
    position: absolute;
    background: linear-gradient(90deg, #8B4513, #A0522D);
    pointer-events: none !important;
    z-index: 60;
}

#magnet {
    position: absolute;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FF0000 0%, #8B0000 50%, #FF0000 100%);
    border-radius: 0 0 20px 20px;
    border-top: 3px solid #666;
    pointer-events: none !important;
    z-index: 61;
}

.magnet-field {
    position: absolute;
    width: 80px;
    height: 80px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px dashed rgba(255, 0, 0, 0.3);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #87CEEB 0%, #4682B4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.screen-content {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    max-width: 300px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.screen-content h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 28px;
}

.screen-content p {
    color: #546e7a;
    margin-bottom: 20px;
    font-size: 16px;
}

.btn-primary, .btn-secondary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:active, .btn-secondary:active {
    transform: scale(0.95);
}

.btn-secondary {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.permission-text {
    font-size: 12px !important;
    color: #90a4ae !important;
    margin-top: 10px !important;
}

.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    animation: popIn 0.3s ease;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.popup-content h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

#caught-fish {
    font-size: 48px;
    margin: 20px 0;
}

@keyframes popIn {
    from {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

.fish {
    position: absolute;
    font-size: 30px;
    transition: all 0.1s linear;
    cursor: pointer;
    z-index: 10;
}

.fish.caught {
    animation: fishCaught 0.5s ease;
}

@keyframes fishCaught {
    to {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

.wave {
    position: absolute;
    width: 100%;
    height: 60px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 60"><path d="M0,30 Q300,0 600,30 T1200,30 L1200,60 L0,60 Z" fill="%234682B4" opacity="0.3"/></svg>');
    background-size: 1200px 60px;
    animation: wave 8s linear infinite;
}

@keyframes wave {
    from { background-position-x: 0; }
    to { background-position-x: 1200px; }
}

.boat-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    pointer-events: none;
}

.boat {
    width: 80px;
    height: 60px;
    position: relative;
    animation: bobbing 2s ease-in-out infinite;
}

@keyframes bobbing {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

.boat-body {
    width: 100%;
    height: 40px;
    background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
    border-radius: 10px 10px 30px 30px;
    position: relative;
}

.boat-sail {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 40px solid #FFF8DC;
}

.player {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #FFD700;
    border-radius: 50%;
}

.player::before {
    content: '😊';
    position: absolute;
    top: -2px;
    left: -2px;
    font-size: 24px;
}