* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
    background: linear-gradient(135deg, #0a4d68 0%, #05668d 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    gap: 20px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ヘッダースタイル */
.header {
    background-color: #1a1a1a;
    color: white;
    padding: 10px 0;
    width: 100%;
    margin: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
}

.header-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
}

.header-link:hover {
    opacity: 0.8;
}

.header-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

h1 {
    color: white;
    margin-top: 70px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#ui {
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.5);
    display: flex;
    gap: 30px;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 24px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.durability-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.durability-label {
    white-space: nowrap;
}

.durability-meter {
    position: relative;
    width: 200px;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.durability-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 10px;
}

.durability-bar.medium {
    background: linear-gradient(90deg, #FFC107, #FFD54F);
}

.durability-bar.low {
    background: linear-gradient(90deg, #f44336, #FF5722);
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

.durability-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 1;
}

#gameContainer {
    position: relative;
    background: radial-gradient(circle at 30% 30%, #6DB3E8, #2E5E8A);
    border: 10px solid #8B4513;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    overflow: hidden;
}

#pond {
    width: 800px;
    height: 600px;
    position: relative;
    cursor: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

.goldfish {
    position: absolute;
    font-size: 40px;
    cursor: pointer;
    transition: transform 0.1s;
    user-select: none;
}

.goldfish:hover {
    transform: scale(1.1);
}

#scoop {
    position: absolute;
    width: 80px;
    height: 80px;
    pointer-events: none;
    z-index: 1000;
    transform: translate(-50%, -50%);
    opacity: 1;
    transition: opacity 0.2s;
}

.scoop-intact {
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 70%);
    border: 3px solid #8B4513;
    border-radius: 50%;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.3);
}

.scoop-broken {
    background: radial-gradient(circle, rgba(255,100,100,0.3) 0%, rgba(255,100,100,0.1) 70%);
    border: 3px solid #8B4513;
    border-radius: 50%;
    position: relative;
}

.scoop-broken::before,
.scoop-broken::after {
    content: '';
    position: absolute;
    background: rgba(139, 69, 19, 0.8);
    width: 2px;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

.scoop-broken::after {
    transform: translateX(-50%) rotate(-45deg);
}

#ui {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-size: 18px;
    display: flex;
    gap: 30px;
}

#ui div {
    font-weight: bold;
}

#score {
    color: #FF6B6B;
    font-size: 24px;
}

#durability {
    color: #4ECDC4;
}

#timer {
    color: #FFD93D;
}

.caught-message {
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    animation: fadeUp 1s ease-out forwards;
    pointer-events: none;
    z-index: 500;
}

@keyframes fadeUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 60px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: none;
    z-index: 2000;
}

#gameOver h2 {
    font-size: 36px;
    color: #FF6B6B;
    margin-bottom: 20px;
}

#rating {
    font-size: 48px;
    margin: 20px 0;
    letter-spacing: 5px;
}

#gameOver p {
    font-size: 24px;
    margin: 15px 0;
    color: #333;
}

#restartBtn {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 20px;
    background: linear-gradient(to bottom, #4ECDC4, #44A89C);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

#restartBtn:hover {
    transform: scale(1.05);
}

#restartBtn:active {
    transform: scale(0.95);
}

.bubble {
    position: absolute;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(255,255,255,0.3));
    border-radius: 50%;
    opacity: 0.6;
    animation: rise linear infinite;
    pointer-events: none;
}

@keyframes rise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.6;
    }
    100% {
        transform: translateY(-600px) translateX(20px);
        opacity: 0;
    }
}
