/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', cursive, sans-serif;
    background: linear-gradient(180deg, #4DD0E1 0%, #00ACC1 50%, #006064 100%);
    overflow: hidden;
    height: 100vh;
    user-select: none;
    touch-action: none;
}

/* Game Container */
.game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Game Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    z-index: 100;
    flex-shrink: 0;
}

.game-info {
    display: flex;
    gap: 30px;
    align-items: center;
}

.game-info > div {
    text-align: center;
}

.label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 2px;
}

#score, #timer, #high-score {
    font-size: 1.8rem;
    font-weight: bold;
    color: #FFD700;
}

.game-controls {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.8rem;
}

/* Game Area */
.game-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* Fishing Net (simple circular) */
.net {
    position: absolute;
    width: 120px;
    height: 120px;
    cursor: grab;
    z-index: 50;
    transition: transform 0.1s ease;
    pointer-events: none;
}

.net:active {
    cursor: grabbing;
}

.net-handle {
    position: absolute;
    bottom: -60px;
    left: 50%;
    width: 16px;
    height: 70px;
    background: linear-gradient(180deg, #8D6E63, #5D4037);
    border-radius: 8px;
    transform: translateX(-50%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.net-rim {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    height: 90%;
    transform: translate(-50%, -50%);
    border: 8px solid #333;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
    box-shadow: inset 0 0 10px rgba(0,0,0,0.25);
}

.net-mesh {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 84%;
    height: 84%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.12) 1px, transparent 1px),
        radial-gradient(circle, rgba(255,255,255,0.12) 1px, transparent 1px);
    background-position: 0 0, 6px 6px;
    background-size: 12px 12px;
    background-color: rgba(255,255,255,0.08);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

/* Particle Effects */
#particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 40;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #4DD0E1;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 1s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
}

/* Game Screens */
.start-screen, .game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(10px);
}

.start-content, .game-over-content {
    text-align: center;
    color: white;
    max-width: 500px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.start-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.start-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.instructions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.instruction {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.instruction-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
}

.instruction p {
    margin: 0;
    font-size: 1.1rem;
    text-align: left;
}

.btn-primary {
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #E55A2B, #E8821A);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.btn-large {
    padding: 20px 40px;
    font-size: 1.4rem;
}

.btn-secondary {
    background: linear-gradient(45deg, #14B8A6, #0D9488);
    color: white;
    text-decoration: none;
    display: inline-block;
    margin-left: 15px;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #0F766E, #115E59);
    transform: translateY(-2px);
}

/* Game Over Screen */
.game-over-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.final-score {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #FFD700;
    font-weight: bold;
}

.new-record {
    font-size: 1.5rem;
    color: #FFD700;
    margin-bottom: 30px;
    animation: celebrate 1s ease-in-out infinite alternate;
}

@keyframes celebrate {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.game-over-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-header {
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .game-info {
        gap: 20px;
        font-size: 0.9rem;
    }
    
    #score, #timer, #high-score {
        font-size: 1.4rem;
    }
    
    .net {
        width: 100px;
        height: 100px;
    }
    
    .start-content, .game-over-content {
        padding: 30px 20px;
        max-width: 400px;
        margin: 20px;
    }
    
    .start-content h1 {
        font-size: 2.2rem;
    }
    
    .instructions {
        gap: 15px;
    }
    
    .instruction {
        padding: 12px;
    }
    
    .instruction-icon {
        font-size: 1.5rem;
        width: 40px;
    }
    
    .instruction p {
        font-size: 1rem;
    }
    
    .game-over-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        padding: 16px 32px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .game-info {
        gap: 15px;
    }
    .net {
        width: 84px;
        height: 84px;
    }
    .net-rim { border-width: 6px; }
    
    .start-content h1 {
        font-size: 1.8rem;
    }
    
    .start-content p {
        font-size: 1.1rem;
    }
    
    .game-over-content h2 {
        font-size: 2rem;
    }
    
    .final-score {
        font-size: 1.6rem;
    }
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .game-header {
        padding: 8px 15px;
    }
    
    .game-info {
        gap: 15px;
        font-size: 0.8rem;
    }
    
    #score, #timer, #high-score {
        font-size: 1.2rem;
    }
    
    .start-content, .game-over-content {
        padding: 20px;
        max-width: 90vw;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .start-content h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .instructions {
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .instruction {
        padding: 8px;
    }
}