* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(to bottom, #0a0a1a 0%, #1a1a3a 50%, #0a0a2a 100%);
    position: relative;
}

.stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.ocean {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to bottom, rgba(20, 50, 100, 0.3) 0%, rgba(10, 30, 80, 0.6) 100%);
}

.wave {
    position: absolute;
    width: 200%;
    height: 50px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(100, 150, 255, 0.3) 25%,
        transparent 50%,
        rgba(100, 150, 255, 0.3) 75%,
        transparent 100%);
    animation: wave 8s infinite linear;
}

.wave1 { bottom: 20px; animation-duration: 8s; }
.wave2 { bottom: 40px; animation-duration: 10s; opacity: 0.7; }
.wave3 { bottom: 60px; animation-duration: 12s; opacity: 0.5; }

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.intro-text {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.8;
    padding: 0 20px;
    max-width: 90%;
    z-index: 10;
}

.intro-text p {
    text-shadow: 0 0 10px rgba(100, 150, 255, 0.5);
}

.bottles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bottle {
    position: absolute;
    width: 80px;
    height: 100px;
    cursor: pointer;
    pointer-events: auto;
    animation: float 3s infinite ease-in-out, glow 2s infinite ease-in-out;
    transition: transform 0.3s;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(79, 195, 247, 0.5)); }
    50% { filter: drop-shadow(0 0 15px rgba(79, 195, 247, 0.8)); }
}

.bottle:hover {
    transform: scale(1.15);
}

.bottle img {
    width: 100%;
    height: 100%;
}

.bottle.shine {
    animation: shine 0.8s ease-in-out;
}

@keyframes shine {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 5px rgba(79, 195, 247, 0.5)); }
    50% { filter: brightness(1.5) drop-shadow(0 0 30px #ffd700); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

.bottle.throwing {
    animation: throwBottle 2s ease-in forwards;
}

@keyframes throwBottle {
    0% {
        transform: translateY(-100vh) scale(0.3) rotate(-20deg);
        opacity: 0;
    }
    20% { opacity: 1; }
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
}

.wish-content {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bottle:hover .wish-content {
    opacity: 1;
}

.bottle-user {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    white-space: nowrap;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

.float-buttons {
    position: fixed;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.float-buttons button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.float-buttons button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.wish-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
}

.user-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a3a0);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a3a, #2a2a5a);
    padding: 30px;
    border-radius: 15px;
    width: 85%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

.modal-content textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    resize: none;
    outline: none;
}

.modal-content textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modal-content button {
    margin-top: 20px;
    padding: 12px 30px;
    border-radius: 25px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.3s;
}

.modal-content button:hover {
    transform: scale(1.05);
}

.send-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a3a0);
    color: white;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    margin-left: 15px;
}

.login-container, .register-container, .user-center {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #0a0a1a 0%, #1a1a3a 100%);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-container h2, .register-container h2, .user-center h2 {
    color: white;
    margin-bottom: 30px;
    font-size: 24px;
}

.login-form, .register-form {
    width: 100%;
    max-width: 350px;
}

.login-form input, .register-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    outline: none;
}

.login-form input::placeholder, .register-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-form button, .register-form button {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #4ecdc4, #44a3a0);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s;
}

.login-form button:hover, .register-form button:hover {
    transform: scale(1.02);
}

.switch-btn {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
    cursor: pointer;
}

.switch-btn:hover {
    color: white;
}

.user-info {
    text-align: center;
    margin-bottom: 30px;
}

.avatar-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #4ecdc4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid white;
}

.avatar-upload-btn input {
    display: none;
}

.user-name {
    color: white;
    font-size: 20px;
    margin-bottom: 10px;
}

.user-wishes {
    width: 100%;
    max-width: 400px;
    overflow-y: auto;
    max-height: 400px;
}

.wish-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    color: white;
}

.wish-item p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.wish-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn {
    margin-top: 20px;
    padding: 10px 30px;
    border-radius: 20px;
    border: none;
    background: rgba(255, 107, 107, 0.8);
    color: white;
    font-size: 14px;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .intro-text {
        font-size: 14px;
        top: 8%;
    }

    .bottle {
        width: 60px;
        height: 75px;
    }

    .float-buttons {
        right: 15px;
        bottom: 80px;
    }

    .float-buttons button {
        width: 55px;
        height: 55px;
        font-size: 11px;
    }
}
