/* ===== 全局变量与重置 ===== */
:root {
    --ocean-deep: #0a4d68;
    --ocean-mid: #088395;
    --ocean-light: #05bfdb;
    --ocean-foam: #e8f5f7;
    --sand: #f4e8c1;
    --cork: #8b4513;
    --glass: rgba(255, 255, 255, 0.15);
    --paper: #fef9e7;
    --text-dark: #2c3e50;
    --text-light: #5a6c7d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    overflow: hidden;
    height: 100vh;
    background: linear-gradient(to bottom, #1a5f7a 0%, #0a4d68 50%, #002d40 100%);
    position: relative;
}

/* ===== 海洋背景 ===== */
.ocean {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(to top, 
        rgba(8, 131, 149, 0.3) 0%, 
        rgba(8, 131, 149, 0.2) 30%, 
        transparent 100%);
    animation: wave-animation 15s infinite linear;
}

.wave1 {
    animation-duration: 20s;
    opacity: 0.4;
}

.wave2 {
    animation-duration: 15s;
    animation-delay: -5s;
    opacity: 0.3;
}

.wave3 {
    animation-duration: 25s;
    animation-delay: -10s;
    opacity: 0.2;
}

@keyframes wave-animation {
    0% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(-25%) translateY(-10px);
    }
    100% {
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== 气泡效果 ===== */
.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -100px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    opacity: 0.6;
    animation: bubble-rise 15s infinite ease-in;
}

.bubble:nth-child(1) {
    left: 10%;
    width: 15px;
    height: 15px;
    animation-duration: 12s;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    left: 30%;
    width: 25px;
    height: 25px;
    animation-duration: 16s;
    animation-delay: 2s;
}

.bubble:nth-child(3) {
    left: 50%;
    width: 18px;
    height: 18px;
    animation-duration: 14s;
    animation-delay: 4s;
}

.bubble:nth-child(4) {
    left: 70%;
    width: 22px;
    height: 22px;
    animation-duration: 18s;
    animation-delay: 1s;
}

.bubble:nth-child(5) {
    left: 85%;
    width: 16px;
    height: 16px;
    animation-duration: 13s;
    animation-delay: 3s;
}

.bubble:nth-child(6) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-duration: 15s;
    animation-delay: 5s;
}

@keyframes bubble-rise {
    0% {
        bottom: -100px;
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        bottom: 110%;
        opacity: 0;
    }
}

/* ===== 漂流瓶容器 ===== */
.bottle-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    animation: bottle-float 6s ease-in-out infinite;
}

@keyframes bottle-float {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(-5deg);
    }
    50% {
        transform: translate(-50%, -55%) rotate(5deg);
    }
}

/* ===== 漂流瓶 ===== */
.bottle {
    position: relative;
    width: 120px;
    height: 180px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottle:hover {
    transform: scale(1.1) rotate(3deg);
}

.bottle:hover .hint {
    opacity: 1;
    transform: translateY(-10px);
}

/* 瓶塞 */
.cork {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 25px;
    background: linear-gradient(to bottom, #a0522d 0%, #8b4513 50%, #6b3410 100%);
    border-radius: 8px 8px 4px 4px;
    box-shadow: 
        inset -2px -2px 4px rgba(0, 0, 0, 0.3),
        inset 2px 2px 4px rgba(160, 82, 45, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 3;
}

.cork::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 2px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1px;
}

/* 瓶身 */
.bottle-body {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 150px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.15) 40%,
        rgba(200, 240, 255, 0.2) 60%,
        rgba(255, 255, 255, 0.1) 100%);
    border-radius: 8px 8px 20px 20px;
    backdrop-filter: blur(8px);
    box-shadow: 
        inset -3px -3px 10px rgba(255, 255, 255, 0.4),
        inset 3px 3px 10px rgba(0, 100, 150, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-left-color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

/* 瓶身高光 */
.bottle-shine {
    position: absolute;
    top: 10%;
    left: -10%;
    width: 35%;
    height: 70%;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%);
    border-radius: 50%;
    transform: rotate(-15deg);
    filter: blur(8px);
}

.bottle-highlight {
    position: absolute;
    top: 20%;
    right: 10%;
    width: 20%;
    height: 40%;
    background: linear-gradient(to bottom, 
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%);
    border-radius: 50%;
    filter: blur(4px);
}

/* 瓶内纸条 */
.paper-in-bottle {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-8deg);
    width: 50px;
    height: 60px;
    background: linear-gradient(to bottom, #fef9e7 0%, #f9edc7 100%);
    border-radius: 3px;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.paper-in-bottle::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    box-shadow: 
        0 5px 0 rgba(0, 0, 0, 0.1),
        0 10px 0 rgba(0, 0, 0, 0.1),
        0 15px 0 rgba(0, 0, 0, 0.1);
}

/* 提示文字 */
.hint {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

/* ===== 遮罩层 ===== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== 消息卡片 ===== */
.message-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 500px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.message-card.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 2px solid rgba(8, 131, 149, 0.1);
    background: linear-gradient(to right, rgba(5, 191, 219, 0.05), transparent);
}

.card-header h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 28px;
    color: var(--ocean-deep);
    margin: 0;
    font-weight: 600;
}

.close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(8, 131, 149, 0.1);
    color: var(--ocean-mid);
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(8, 131, 149, 0.2);
    transform: rotate(90deg);
}

.card-content {
    padding: 32px 28px;
}

/* 阅读模式 */
.read-mode {
    display: none;
}

.read-mode.active {
    display: block;
    animation: fade-in 0.5s ease;
}

.message-display {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    padding: 24px;
    background: linear-gradient(to bottom, #fef9e7 0%, #fdf8e3 100%);
    border-radius: 16px;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-dark);
    white-space: pre-wrap;
    word-wrap: break-word;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.05),
        0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(139, 69, 19, 0.1);
}

.message-display::-webkit-scrollbar {
    width: 8px;
}

.message-display::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.message-display::-webkit-scrollbar-thumb {
    background: rgba(8, 131, 149, 0.3);
    border-radius: 4px;
}

.message-display::-webkit-scrollbar-thumb:hover {
    background: rgba(8, 131, 149, 0.5);
}

.reply-btn {
    width: 100%;
    margin-top: 20px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--ocean-mid) 0%, var(--ocean-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Noto Serif SC', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(8, 131, 149, 0.3);
}

.reply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 131, 149, 0.4);
}

.reply-btn:active {
    transform: translateY(0);
}

/* 写入模式 */
.write-mode {
    display: none;
}

.write-mode.active {
    display: block;
    animation: fade-in 0.5s ease;
}

.message-input {
    width: 100%;
    min-height: 200px;
    max-height: 400px;
    padding: 20px;
    background: linear-gradient(to bottom, #fef9e7 0%, #fdf8e3 100%);
    border: 2px solid rgba(8, 131, 149, 0.2);
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
    font-family: 'Noto Serif SC', serif;
    resize: vertical;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message-input:focus {
    outline: none;
    border-color: var(--ocean-light);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.05),
        0 0 0 4px rgba(5, 191, 219, 0.1);
}

.message-input::placeholder {
    color: var(--text-light);
    opacity: 0.6;
}

.char-count {
    text-align: right;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-light);
}

.throw-btn {
    width: 100%;
    margin-top: 20px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Noto Serif SC', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.throw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.throw-btn:active {
    transform: translateY(0);
}

/* ===== 动画 ===== */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .bottle {
        width: 100px;
        height: 150px;
    }

    .bottle-body {
        width: 70px;
        height: 125px;
    }

    .cork {
        width: 40px;
        height: 22px;
    }

    .message-card {
        width: 95%;
        max-width: none;
    }

    .card-header h2 {
        font-size: 24px;
    }

    .card-content {
        padding: 24px 20px;
    }

    .message-display,
    .message-input {
        font-size: 16px;
    }
}

/* ===== 历史记录按钮 ===== */
.history-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ocean-deep);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    z-index: 100;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.history-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.history-btn:active {
    transform: translateY(0) scale(1);
}

.history-btn svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* ===== 固定安装按钮 ===== */
.install-app-btn {
    position: fixed;
    top: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 
        0 4px 20px rgba(81, 207, 102, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    z-index: 100;
    transition: all 0.3s ease;
    animation: install-pulse 2s ease-in-out infinite;
}

.install-app-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(81, 207, 102, 0.5);
    animation: none;
}

.install-app-btn:active {
    transform: translateY(0) scale(1);
}

.install-app-btn svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

@keyframes install-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(81, 207, 102, 0.4),
                    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(81, 207, 102, 0.6),
                    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* ===== 历史记录面板 ===== */
.history-panel {
    position: fixed;
    top: 50%;
    right: -600px;
    transform: translateY(-50%);
    width: 90%;
    max-width: 550px;
    height: 85vh;
    max-height: 700px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px 0 0 24px;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.history-panel.active {
    right: 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 2px solid rgba(8, 131, 149, 0.1);
    background: linear-gradient(to right, rgba(5, 191, 219, 0.05), transparent);
    flex-shrink: 0;
}

.history-header h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 24px;
    color: var(--ocean-deep);
    margin: 0;
    font-weight: 600;
}

.history-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px 28px;
}

.history-stats {
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(5, 191, 219, 0.1), rgba(8, 131, 149, 0.05));
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-dark);
    flex-shrink: 0;
}

.history-stats strong {
    color: var(--ocean-mid);
    font-size: 18px;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
}

.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(8, 131, 149, 0.3);
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(8, 131, 149, 0.5);
}

.history-item {
    background: linear-gradient(to bottom, #fef9e7 0%, #fdf8e3 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(139, 69, 19, 0.1);
    transition: all 0.3s ease;
    animation: slide-in 0.4s ease;
}

.history-item:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-light);
}

.history-item-id {
    font-weight: 600;
    color: var(--ocean-mid);
}

.history-item-time {
    font-size: 11px;
}

.history-item-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 150px;
    overflow: hidden;
    position: relative;
}

.history-item-content.expanded {
    max-height: none;
}

.history-item-content.has-more::after {
    content: '...';
    position: absolute;
    bottom: 0;
    right: 0;
    padding-left: 20px;
    background: linear-gradient(to right, transparent, #fdf8e3 50%);
}

.expand-btn {
    margin-top: 8px;
    padding: 4px 12px;
    background: none;
    border: 1px solid rgba(8, 131, 149, 0.3);
    border-radius: 6px;
    color: var(--ocean-mid);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: rgba(8, 131, 149, 0.1);
    border-color: var(--ocean-mid);
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 14px;
}

.empty-history {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-history svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* ===== 分页 ===== */
.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(8, 131, 149, 0.1);
    flex-shrink: 0;
}

.page-btn {
    padding: 8px 16px;
    background: rgba(8, 131, 149, 0.1);
    border: 1px solid rgba(8, 131, 149, 0.2);
    border-radius: 8px;
    color: var(--ocean-mid);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
}

.page-btn:hover:not(:disabled) {
    background: rgba(8, 131, 149, 0.2);
    border-color: var(--ocean-mid);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-btn.active {
    background: linear-gradient(135deg, var(--ocean-mid) 0%, var(--ocean-light) 100%);
    color: white;
    border-color: var(--ocean-mid);
}

.page-info {
    font-size: 13px;
    color: var(--text-light);
    margin: 0 8px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .history-btn {
        width: 48px;
        height: 48px;
        top: 16px;
        right: 16px;
    }

    .history-btn svg {
        width: 20px;
        height: 20px;
    }

    .history-panel {
        width: 100%;
        max-width: none;
        border-radius: 24px 0 0 24px;
        right: -100%;
    }

    .history-panel.active {
        right: 0;
    }

    .history-header h2 {
        font-size: 20px;
    }

    .history-content {
        padding: 16px 20px;
    }

    .history-item {
        padding: 12px;
    }
}

/* ===== PWA 安装提示 ===== */
.install-prompt {
    position: fixed;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 420px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
    z-index: 101;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 24px;
}

.install-prompt.show {
    bottom: 0;
}

.install-prompt-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.install-prompt-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.install-prompt-text {
    flex: 1;
}

.install-prompt-text h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: var(--ocean-deep);
    font-family: 'Ma Shan Zheng', cursive;
}

.install-prompt-text p {
    margin: 0;
    font-size: 14px;
    color: var(--text-light);
}

.install-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--ocean-mid) 0%, var(--ocean-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(8, 131, 149, 0.3);
    font-family: 'Noto Serif SC', serif;
    flex-shrink: 0;
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(8, 131, 149, 0.4);
}

.install-btn:active {
    transform: translateY(0);
}

.install-close-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.install-close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .install-prompt {
        width: 100%;
        max-width: none;
        padding: 20px;
        border-radius: 20px 20px 0 0;
    }

    .install-prompt-icon {
        font-size: 32px;
    }

    .install-prompt-text h3 {
        font-size: 16px;
    }

    .install-prompt-text p {
        font-size: 13px;
    }

    .install-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ===== iOS 安装指南 ===== */
.ios-install-guide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.ios-install-guide.show {
    opacity: 1;
    visibility: visible;
}

.ios-guide-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    padding: 32px 24px;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.ios-install-guide.show .ios-guide-content {
    transform: scale(1);
}

.ios-guide-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ios-guide-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.ios-guide-content h3 {
    margin: 0 0 24px 0;
    font-size: 22px;
    color: var(--ocean-deep);
    font-family: 'Ma Shan Zheng', cursive;
    text-align: center;
}

.ios-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.ios-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(8, 131, 149, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.ios-step:hover {
    background: rgba(8, 131, 149, 0.1);
    transform: translateX(4px);
}

.ios-step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--ocean-mid) 0%, var(--ocean-light) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(8, 131, 149, 0.3);
}

.ios-step-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-dark);
}

.ios-step-text strong {
    color: var(--ocean-mid);
    font-weight: 600;
}

.ios-guide-note {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    font-style: italic;
}

@media (max-width: 768px) {
    .ios-guide-content {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .ios-guide-content h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .ios-step {
        padding: 14px;
        gap: 14px;
    }

    .ios-step-number {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .ios-step-text {
        font-size: 14px;
    }

    .install-app-btn {
        top: 90px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .install-app-btn svg {
        width: 20px;
        height: 20px;
    }

    .history-btn {
        top: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .history-btn svg {
        width: 20px;
        height: 20px;
    }
}
