/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    overflow-x: hidden;
    height: 100vh;
}

/* 海洋容器 */
.ocean-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        180deg,
        #FFB6C1 0%,     /* 粉色天空 */
        #DDA0DD 20%,    /* 淡紫色 */
        #B0E0E6 40%,    /* 粉蓝色 */
        #87CEEB 60%,    /* 天蓝色 */
        #98D8E8 80%,    /* 浅蓝色 */
        #B0E0E6 100%    /* 粉蓝色海面 */
    );
    overflow: hidden;
}

/* 海洋画布 */
#ocean-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 星空效果 */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #FFE4E1, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,182,193,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #FFF0F5, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,105,180,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #FFB6C1, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: kawaii-twinkle 4s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes kawaii-twinkle {
    0% { 
        opacity: 0.6; 
        transform: scale(1);
    }
    100% { 
        opacity: 0.9;
        transform: scale(1.02);
    }
}

/* 主界面 */
.main-interface {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
}

/* 主搜索容器 - 梦幻少女风格 */
.main-search-container {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

/* 搜索框 - 梦幻重设计 */
.search-box {
    background: linear-gradient(145deg, 
        rgba(255, 240, 245, 0.95) 0%,
        rgba(255, 228, 240, 0.9) 50%,
        rgba(248, 187, 217, 0.85) 100%
    );
    backdrop-filter: blur(25px);
    border-radius: 30px;
    padding: 20px 30px;
    box-shadow: 
        0 15px 50px rgba(255, 182, 193, 0.4),
        0 8px 25px rgba(221, 160, 221, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border: 3px solid rgba(255, 255, 255, 0.6);
    width: 90%;
    max-width: 700px;
    min-width: 320px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.search-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.15) 0%,
        transparent 70%
    );
    animation: sparkleRotate 10s linear infinite;
    pointer-events: none;
}

.search-title {
    text-align: center;
    font-size: 1.4rem;
    color: #8B4C93;
    margin-bottom: 18px;
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(139, 76, 147, 0.2);
    position: relative;
    z-index: 1;
}

.search-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    padding: 8px;
    border: 2px solid rgba(255, 182, 193, 0.4);
    box-shadow: inset 0 2px 8px rgba(255, 182, 193, 0.1);
    position: relative;
    z-index: 1;
}

#mainSearchInput {
    flex: 1;
    border: none;
    background: transparent;
    padding: 15px 20px;
    font-size: 1.1rem;
    color: #8B4C93;
    outline: none;
    font-weight: 400;
    min-width: 200px;
    width: 100%;
}

#mainSearchInput::placeholder {
    color: #DDA0DD;
    font-style: italic;
    opacity: 0.8;
}

#mainSearchInput:focus {
    color: #6B3A6E;
}

.btn-write-new {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    white-space: nowrap;
    background: linear-gradient(135deg, #FFB6C1, #DDA0DD, #B0E0E6);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 182, 193, 0.4);
    position: relative;
    overflow: visible;
    font-weight: 500;
    min-width: 120px;
}

.btn-write-new::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.btn-write-new:hover::before {
    width: 200px;
    height: 200px;
}

.btn-write-new:hover {
    background: linear-gradient(135deg, #FFB6C1, #E6E6FA, #87CEEB);
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 10px 30px rgba(255, 182, 193, 0.6);
}

.btn-icon {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.btn-text {
    font-weight: 500;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* 搜索面板 */
.search-panel {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 4, 51, 0.9);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    min-width: 400px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 200;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.search-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.search-content {
    position: relative;
}

.search-content input {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    outline: none;
    backdrop-filter: blur(5px);
}

.search-content input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-content input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.date-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.date-filters input {
    flex: 1;
    margin-bottom: 0;
}

.btn-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 100, 100, 0.8);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: rgba(255, 100, 100, 1);
    transform: scale(1.1);
}

/* 写消息面板 - 少女幻想风格 */
.write-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 300;
}

.write-panel.active {
    opacity: 1;
    visibility: visible;
}

.write-content {
    background: linear-gradient(145deg, 
        rgba(255, 240, 245, 0.98) 0%,
        rgba(255, 228, 240, 0.95) 50%,
        rgba(248, 187, 217, 0.92) 100%
    );
    backdrop-filter: blur(25px);
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 30px;
    padding: 40px;
    min-width: 500px;
    max-width: 600px;
    box-shadow: 
        0 20px 60px rgba(255, 182, 193, 0.4),
        0 10px 30px rgba(221, 160, 221, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
    transform: scale(0.8) translateY(20px);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.write-panel.active .write-content {
    transform: scale(1) translateY(0);
}

.write-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    animation: sparkleRotate 8s linear infinite;
    pointer-events: none;
}

.write-content h2 {
    color: #8B4C93;
    text-align: center;
    margin-bottom: 12px;
    font-size: 1.8rem;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(139, 76, 147, 0.3);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.write-subtitle {
    color: #B8749B;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1rem;
    font-style: italic;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.write-content textarea {
    width: 100%;
    height: 150px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(255, 182, 193, 0.4);
    border-radius: 20px;
    color: #666;
    font-size: 1.1rem;
    font-family: inherit;
    resize: none;
    outline: none;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0 2px 8px rgba(255, 182, 193, 0.2),
        0 0 0 0 rgba(255, 182, 193, 0.4);
    position: relative;
    z-index: 1;
}

.write-content textarea::placeholder {
    color: #B8749B;
    font-style: italic;
}

.write-content textarea:focus {
    border-color: rgba(221, 160, 221, 0.6);
    box-shadow: 
        inset 0 2px 8px rgba(255, 182, 193, 0.3),
        0 0 20px rgba(221, 160, 221, 0.4);
    background: rgba(255, 255, 255, 0.9);
}

.write-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.write-buttons button {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: visible;
    white-space: nowrap;
    min-width: 140px;
}

.write-buttons button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.write-buttons button:hover::before {
    width: 200px;
    height: 200px;
}

.btn-send {
    background: linear-gradient(135deg, #FFB6C1, #DDA0DD, #B0E0E6);
    box-shadow: 0 6px 20px rgba(255, 182, 193, 0.5);
}

.btn-send:hover {
    background: linear-gradient(135deg, #FFB6C1, #E6E6FA, #87CEEB);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 182, 193, 0.7);
}

.btn-cancel {
    background: linear-gradient(135deg, #F8BBD9, #E1BEE7);
    box-shadow: 0 6px 20px rgba(248, 187, 217, 0.4);
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #F8BBD9, #DDA0DD);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(248, 187, 217, 0.6);
}

@keyframes sparkleRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 漂流瓶容器 */
.bottles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 200px;
    z-index: 50;
}

/* 瓶子详情弹窗 - 少女幻想风格 */
.bottle-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center,
        rgba(255, 182, 193, 0.3) 0%,
        rgba(221, 160, 221, 0.4) 50%,
        rgba(176, 224, 230, 0.2) 100%
    );
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 1000;
}

.bottle-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 240, 245, 0.9) 50%,
        rgba(248, 187, 217, 0.85) 100%
    );
    border-radius: 30px;
    padding: 40px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        0 25px 80px rgba(255, 182, 193, 0.4),
        0 15px 40px rgba(221, 160, 221, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: scale(0.8) translateY(20px);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg,
        rgba(255, 182, 193, 0.3),
        rgba(221, 160, 221, 0.3),
        rgba(176, 224, 230, 0.3),
        rgba(248, 187, 217, 0.3)
    );
    border-radius: 35px;
    z-index: -1;
    animation: borderGlow 4s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; transform: rotate(0deg); }
    50% { opacity: 0.8; transform: rotate(180deg); }
}

.bottle-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.bottle-paper {
    background: linear-gradient(135deg,
        #FFF8F0 0%,
        #FFF0F5 50%,
        #F0F8FF 100%
    );
    border: none;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 
        inset 0 2px 10px rgba(255, 182, 193, 0.2),
        0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.bottle-paper::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        rgba(255, 182, 193, 0.3),
        rgba(255, 182, 193, 0.3) 15px,
        transparent 15px,
        transparent 20px
    );
}

.bottle-paper::after {
    content: '💕';
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.2rem;
    opacity: 0.6;
}

.message-content {
    color: #8B4C93;
    font-size: 1.3rem;
    line-height: 1.7;
    margin-bottom: 25px;
    font-style: italic;
    min-height: 60px;
    text-shadow: 0 1px 3px rgba(139, 76, 147, 0.1);
    position: relative;
    z-index: 1;
}

.message-date {
    color: #B8749B;
    font-size: 1rem;
    text-align: right;
    border-top: 2px solid rgba(255, 182, 193, 0.3);
    padding-top: 15px;
    font-weight: 300;
}

.poem-annotation {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    text-align: center;
    border: 1px dashed rgba(221, 160, 221, 0.4);
}

.poem-loading {
    color: #DDA0DD;
    font-size: 0.85rem;
    font-style: italic;
    animation: fadeInOut 2s ease-in-out infinite;
}

.poem-text-small {
    color: #B8749B;
    font-size: 0.8rem;
    line-height: 1.5;
    font-style: italic;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(184, 116, 155, 0.2);
}

.poem-author-small {
    color: #DDA0DD;
    font-size: 0.75rem;
    font-weight: 300;
}

.btn-close-modal {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #FFB6C1, #DDA0DD, #B0E0E6);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 6px 25px rgba(255, 182, 193, 0.4);
    position: relative;
    overflow: visible;
    white-space: nowrap;
    min-width: 140px;
}

.btn-close-modal::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.btn-close-modal:hover::before {
    width: 300px;
    height: 300px;
}

.btn-close-modal:hover {
    background: linear-gradient(135deg, #FFB6C1, #E6E6FA, #87CEEB);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 35px rgba(255, 182, 193, 0.6);
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* 响应式设计 - 少女幻想风格 */
@media (max-width: 768px) {
    .main-search-container {
        top: 30px;
    }
    
    .search-box {
        min-width: 95vw;
        max-width: 95vw;
        padding: 18px 25px;
    }
    
    .search-title {
        font-size: 1.2rem;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    
    .search-input-container {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 15px;
    }
    
    .btn-write-new {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
        font-size: 1rem;
        min-width: 140px;
        white-space: nowrap;
        overflow: visible;
    }
    
    .bottles-container {
        padding-top: 180px;
    }
    
    .write-content {
        min-width: 90vw;
        max-width: 90vw;
        padding: 30px 25px;
    }
    
    .write-content h2 {
        font-size: 1.6rem;
    }
    
    .write-subtitle {
        font-size: 0.9rem;
    }
    
    .write-content textarea {
        height: 120px;
        font-size: 1rem;
        padding: 18px;
    }
    
    .write-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .write-buttons button {
        width: 100%;
        padding: 18px 20px;
        font-size: 1.1rem;
        min-width: 160px;
        white-space: nowrap;
    }
    
    .modal-content {
        margin: 0 15px;
        max-width: calc(100vw - 30px);
        padding: 30px 25px;
    }
    
    .bottle-paper {
        padding: 25px 20px;
    }
    
    .message-content {
        font-size: 1.2rem;
    }
    
    .message-date {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .main-search-container {
        top: 20px;
    }
    
    .search-box {
        padding: 18px 20px;
        min-width: 98vw;
        max-width: 98vw;
    }
    
    .search-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .btn-write-new {
        padding: 14px 20px;
        font-size: 1rem;
        min-width: 140px;
        white-space: nowrap;
        overflow: visible;
    }
    
    .btn-icon {
        font-size: 1.2rem;
        flex-shrink: 0;
    }
    
    .btn-text {
        flex-shrink: 0;
        margin-left: 4px;
    }
    
    .bottles-container {
        padding-top: 160px;
    }
    
    .write-content {
        padding: 25px 20px;
    }
    
    .write-content h2 {
        font-size: 1.4rem;
    }
    
    .write-subtitle {
        font-size: 0.85rem;
    }
    
    .write-content textarea {
        height: 100px;
        font-size: 0.95rem;
        padding: 15px;
    }
    
    .write-buttons button {
        padding: 16px 20px;
        font-size: 1rem;
        min-width: 160px;
        white-space: nowrap;
    }
    
    .modal-content {
        margin: 0 10px;
        padding: 25px 20px;
    }
    
    .bottle-paper {
        padding: 20px 15px;
    }
    
    .message-content {
        font-size: 1.1rem;
    }
    
    .btn-close-modal {
        padding: 18px 20px;
        font-size: 1.1rem;
        min-width: 140px;
        white-space: nowrap;
    }
}

/* 漂流瓶星子光晕效果（优化版，减少抖动） */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-6px) rotate(0deg);
    }
}

@keyframes kawaii-glow {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(255, 182, 193, 0.3),
            0 0 30px rgba(173, 216, 230, 0.2);
        filter: brightness(1) saturate(1);
    }
    50% {
        box-shadow: 
            0 0 20px rgba(255, 182, 193, 0.4),
            0 0 40px rgba(173, 216, 230, 0.3);
        filter: brightness(1.05) saturate(1.1);
    }
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.02) rotate(0deg);
        opacity: 1;
    }
}

.bottle-item {
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bottle-item:hover {
    animation-play-state: paused;
    transform: scale(1.1) translateY(-8px) !important;
    filter: 
        brightness(1.2) 
        saturate(1.2) 
        drop-shadow(0 15px 30px rgba(255,182,193,0.4))
        drop-shadow(0 0 20px rgba(173,216,230,0.5)) !important;
}

/* 为不同的瓶子添加随机延迟 */
.bottle-item:nth-child(1) { animation-delay: 0s, 0.5s, 1s; }
.bottle-item:nth-child(2) { animation-delay: 0.8s, 1.2s, 2s; }
.bottle-item:nth-child(3) { animation-delay: 1.6s, 0.3s, 0.5s; }
.bottle-item:nth-child(4) { animation-delay: 0.4s, 1.8s, 3s; }
.bottle-item:nth-child(5) { animation-delay: 1.2s, 0.7s, 1.5s; }
.bottle-item:nth-child(6) { animation-delay: 2s, 1.5s, 0.2s; }
.bottle-item:nth-child(7) { animation-delay: 0.6s, 2.2s, 2.8s; }

/* === 新增界面优化样式 === */

/* 1. 增强搜索框焦点效果 */
.search-box:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 20px 60px rgba(255, 182, 193, 0.5),
        0 12px 35px rgba(221, 160, 221, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#mainSearchInput:focus + .btn-write-new,
.search-input-container:focus-within {
    border-color: rgba(255, 105, 180, 0.6);
    box-shadow: 
        inset 0 2px 8px rgba(255, 182, 193, 0.2),
        0 0 0 3px rgba(255, 182, 193, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

/* 2. 按钮悬停增强效果 */
.btn-write-new:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 12px 30px rgba(255, 182, 193, 0.6),
        0 0 20px rgba(255, 105, 180, 0.4);
    background: linear-gradient(135deg, #FF9FAB, #E195D3, #9BDBF0);
}

.btn-write-new:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 15px rgba(255, 182, 193, 0.5);
}

/* 瓶子弹窗 - 恢复原版动画 */
.bottle-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

/* 写消息面板 - 恢复原版动画 */
.write-panel.active .write-content {
    transform: scale(1) translateY(0);
}

/* 5. 响应式设计增强 */
@media (max-width: 768px) {
    .search-box {
        padding: 15px 20px;
        border-radius: 25px;
        width: 95%;
        min-width: 280px;
    }
    
    .search-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .search-input-container {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    #mainSearchInput {
        padding: 15px 20px;
        font-size: 1rem;
        text-align: center;
        width: 100%;
        min-width: 250px;
    }
    
    .btn-write-new {
        padding: 12px 20px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
        min-width: 120px;
        white-space: nowrap;
        overflow: visible;
    }
    
    .main-search-container {
        top: 20px;
        width: 100%;
        padding: 0 10px;
    }
}

/* 6. 加载动画优化 */
.loading-bottles {
    animation: kawaii-loading 2s ease-in-out infinite;
}

@keyframes kawaii-loading {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

/* 7. 空状态优化 */
.empty-bottles {
    animation: kawaii-empty 3s ease-in-out infinite;
}

@keyframes kawaii-empty {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.8;
    }
}

/* 8. 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 182, 193, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FFB6C1, #DDA0DD);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FF9FAB, #E195D3);
}

/* 9. 性能优化 */
.bottle-item,
.search-box,
.btn-write-new {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* 瓶子浮动动画类（简化版，避免抖动） */
.bottle-float-animation {
    animation: 
        float 6s ease-in-out infinite,
        kawaii-glow 4s ease-in-out infinite,
        sparkle 8s ease-in-out infinite;
}

/* 10. 微交互增强 */
.btn-write-new .btn-icon {
    transition: transform 0.3s ease;
}

.btn-write-new:hover .btn-icon {
    transform: scale(1.2) rotate(15deg);
}

.search-title {
    transition: all 0.3s ease;
}

.search-box:hover .search-title {
    transform: translateY(-2px);
    text-shadow: 0 4px 12px rgba(139, 76, 147, 0.3);
}