* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    background: linear-gradient(to bottom, #0a0a2e 0%, #1a1a4e 50%, #0d0d3d 100%);
    min-height: 100vh;
    color: #fff;
}

.starry-sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="white" opacity="0.8"/></svg>') repeat;
    background-size: 100px 100px;
    animation: twinkle 4s ease-in-out infinite;
}

.stars2 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><circle cx="75" cy="75" r="1.5" fill="white" opacity="0.6"/></svg>') repeat;
    background-size: 150px 150px;
    animation: twinkle 6s ease-in-out infinite 1s;
}

.stars3 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle cx="100" cy="100" r="2" fill="white" opacity="0.4"/></svg>') repeat;
    background-size: 200px 200px;
    animation: twinkle 8s ease-in-out infinite 2s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.3; }
}

.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    padding: 30px 20px 20px;
}

.title {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.bottle-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.wish-bottle {
    position: absolute;
    cursor: grab;
    animation: float 6s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.wish-bottle:hover {
    transform: scale(1.1);
}

.wish-bottle.dragging {
    cursor: grabbing;
    animation: none;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(-2deg);
    }
    25% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% {
        transform: translateY(-5px) rotate(-1deg);
    }
    75% {
        transform: translateY(-20px) rotate(1deg);
    }
}

.bottle-svg {
    width: 60px;
    height: 100px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.bottle-label {
    text-align: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 5px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.footer {
    padding: 20px;
    text-align: center;
}

.throw-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    color: #1a1a4e;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
}

.throw-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

.throw-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 24px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a4e, #2a2a6e);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 22px;
    color: #FFD700;
}

.close-btn {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #fff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #FFD700;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group textarea {
    height: 120px;
    resize: none;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #1a1a4e;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.form-tip {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 15px;
}

.wish-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bottle-img {
    width: 60px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

@media (max-width: 480px) {
    .bottle-img {
        width: 50px;
        height: 85px;
    }
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px 30px;
    border-radius: 10px;
    z-index: 2000;
    display: none;
    text-align: center;
    max-width: 80%;
}

.toast.show {
    display: block;
    animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.new-bottle {
    position: fixed;
    left: 50%;
    bottom: -150px;
    transform: translateX(-50%);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
}

.new-bottle.animate {
    animation: throwBottle 3s ease-out forwards;
}

@keyframes throwBottle {
    0% {
        bottom: -150px;
        opacity: 1;
        transform: translateX(-50%) rotate(0deg);
    }
    30% {
        bottom: 60%;
        opacity: 1;
        transform: translateX(-50%) rotate(180deg);
    }
    60% {
        bottom: 40%;
        opacity: 1;
        transform: translateX(-50%) rotate(360deg);
    }
    100% {
        bottom: 40%;
        left: 50%;
        opacity: 0;
        transform: translateX(-50%) rotate(360deg);
    }
}

.bottle-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: glow 1s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

.bottle-body {
    position: relative;
    width: 50px;
    height: 80px;
}

.bottle-neck {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    margin: 0 auto;
    border-radius: 5px 5px 0 0;
}

.bottle-main {
    width: 50px;
    height: 60px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 10px 10px 20px 20px;
    position: relative;
    overflow: hidden;
}

.bottle-shine {
    position: absolute;
    width: 15px;
    height: 40px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    top: 10px;
    left: 8px;
}

.shooting-star {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px #fff;
    animation: shooting 1s linear forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes shooting {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(300px) translateY(300px);
        opacity: 0;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 24px;
    }
    
    .bottle-svg {
        width: 50px;
        height: 85px;
    }
    
    .bottle-label {
        font-size: 9px;
        max-width: 70px;
    }
    
    .throw-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
}
