.lanterns-page {
    background: linear-gradient(180deg, #0a0e27 0%, #1a1f3a 50%, #0f1425 100%);
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.lanterns-page .navbar {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lanterns-page .logo,
.lanterns-page .nav-menu a {
    color: #ffffff;
}

.lanterns-page .nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.lanterns-page .nav-menu a.active {
    background: #ffffff;
    color: #1a1a1a;
}

/* 孔明灯星空容器 */
.lanterns-sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: visible;
    pointer-events: none;
}

.floating-lantern {
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.floating-lantern:hover {
    transform: scale(1.15);
    filter: brightness(1.3) drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
}

/* 飘浮的孔明灯 */
.floating-lantern {
    position: absolute;
    filter: drop-shadow(0 0 15px rgba(255, 200, 100, 0.4));
    cursor: pointer;
    transition: filter 0.3s ease;
}

.floating-lantern:hover {
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.7));
}

.floating-lantern svg {
    width: 100%;
    height: 100%;
}

/* 底部控制面板 */
.control-panel {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.view-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.view-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.button-icon {
    font-size: 1.4rem;
}

.button-text {
    font-size: 1rem;
}

/* 写字弹窗 */
.write-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
}

.write-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-container {
    position: relative;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    max-width: 650px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 10;
}

.close-modal:hover {
    color: #ffffff;
}

.modal-content h2 {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-align: center;
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* 孔明灯预览 */
.lantern-preview-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.lantern-svg {
    width: 160px;
    height: 256px;
    filter: drop-shadow(0 5px 25px rgba(255, 200, 100, 0.4));
    flex-shrink: 0;
}

/* 大小选择器 */
.size-picker {
    text-align: left;
}

.size-picker label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

.size-options {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

.size-btn {
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.size-btn.active {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.15);
    color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* 点火按钮容器 */
.ignite-container {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.ignite-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* 点火按钮 - 纯文字样式 */
.ignite-button {
    padding: 0;
    background: none;
    border: none;
    color: #FFD700;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    text-align: center;
}

.ignite-button:hover {
    color: #FFA500;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.ignite-button:active {
    transform: scale(0.95);
}

/* 点火提示文字 */
.ignite-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-style: italic;
    opacity: 1;
    transition: opacity 0.3s ease;
    text-align: center;
}

.ignite-hint.hidden {
    opacity: 0;
}

/* 选项区域 */
.lantern-options {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 颜色选择器 */
.color-picker {
    text-align: left;
}

.color-picker label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

.color-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.color-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.color-btn.active {
    border-color: #FFD700;
    border-width: 3px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* 输入区域 */
.wish-input-area {
    width: 100%;
}

.wish-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.random-wish-btn {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #FFD700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.random-wish-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

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

.wish-input-area textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
}

.wish-input-area textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.wish-input-area textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.char-count {
    text-align: right;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* 查看孔明灯文字弹窗 */
.view-wish-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.view-wish-modal.active {
    display: flex;
}

.view-wish-content {
    position: relative;
    background: rgba(26, 26, 26, 0.95);
    border: 3px solid rgba(255, 215, 0, 0.5);
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.4);
    animation: scaleIn 0.3s ease;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.close-view-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-view-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.wish-display {
    color: #FFD700;
    font-size: 2rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.6;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.5),
        0 0 60px rgba(255, 215, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: pre-wrap;
    word-wrap: break-word;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 火焰动画 */
@keyframes flameFlicker {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.flame-lit {
    animation: flameFlicker 0.3s ease-in-out infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 控制面板 */
    .control-panel {
        bottom: 1.5rem;
        width: 90%;
        left: 5%;
        transform: none;
    }
    
    /* 按钮 - 全宽显示 */
    .view-button {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        gap: 0.5rem;
        justify-content: center;
    }

    .button-icon {
        font-size: 1.2rem;
    }
    
    /* 弹窗 */
    .write-modal {
        align-items: flex-start;
        padding-top: 100px;
    }
    
    .modal-container {
        padding: 1.5rem;
        width: 95%;
        max-height: calc(100vh - 120px);
        border-radius: 15px;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.2rem;
    }
    
    .modal-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    /* 预览区域 */
    .lantern-preview-container {
        flex-direction: column;
        gap: 1rem;
    }

    .lantern-options {
        width: 100%;
    }

    .lantern-svg {
        width: 140px;
        height: 224px;
    }
    
    /* 选项 */
    .color-picker label,
    .size-picker label {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .color-btn {
        width: 35px;
        height: 35px;
    }
    
    .size-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* 输入区 */
    .wish-input-area textarea {
        min-height: 70px;
        font-size: 0.9rem;
        padding: 0.7rem;
    }
    
    .char-count {
        font-size: 0.8rem;
    }
    
    /* 点火按钮 */
    .ignite-button {
        font-size: 0.95rem;
    }
    
    .ignite-hint {
        font-size: 0.7rem;
    }
    
    /* 关闭按钮 */
    .close-modal {
        width: 35px;
        height: 35px;
        font-size: 1.8rem;
        top: 0.8rem;
        right: 0.8rem;
    }
    
    /* 音乐按钮 */
    .music-toggle {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 1.3rem;
    }
    
    /* 查看心愿弹窗 */
    .view-wish-content {
        padding: 2rem 1.5rem;
        width: 95%;
        max-width: none;
    }
    
    .wish-display {
        font-size: 1.5rem;
        line-height: 1.5;
    }
    
    .close-view-btn {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    /* 超小屏幕 */
    .control-panel {
        width: 95%;
        left: 2.5%;
        bottom: 1.2rem;
    }
    
    .view-button {
        width: 100%;
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }
    
    .button-text {
        font-size: 0.95rem;
    }
    
    .write-modal {
        padding-top: 90px;
    }
    
    .modal-container {
        padding: 1.2rem;
        width: 98%;
        max-height: calc(100vh - 110px);
    }
    
    .modal-content h2 {
        font-size: 1.3rem;
    }
    
    .modal-subtitle {
        font-size: 0.8rem;
    }
    
    .lantern-svg {
        width: 120px;
        height: 192px;
    }
    
    .color-btn {
        width: 32px;
        height: 32px;
    }
    
    .size-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .wish-input-area textarea {
        min-height: 65px;
        font-size: 0.85rem;
    }
    
    .wish-display {
        font-size: 1.3rem;
    }
    
    .close-modal {
        width: 32px;
        height: 32px;
        font-size: 1.6rem;
        top: 0.6rem;
        right: 0.6rem;
    }
}
