body{margin:0;padding:0;background:linear-gradient(135deg, #ffe6fa 0%, #fff5e6 50%, #ffe6f0 100%);font-size:14px;font-family:'微软雅黑','宋体',sans-serif;color:#231F20;overflow-x:hidden;min-height:100vh;}
a {color:#000;font-size:14px;}
#main{width:100%;min-height:80vh;display:flex;align-items:center;justify-content:center;padding:20px 0;box-sizing:border-box;}
#wrap{position:relative;margin:0 auto;width:1100px;height:680px;margin-top:10px;max-width:95vw;}
#text{width:400px;height:825px;left:60px;top:80px;position:absolute;z-index:10;}
#code{display:none;font-size:16px;line-height:1.8;}
#clock-box {position:absolute;left:60px;top:550px;font-size:28px;display:none;z-index:10;}
#clock-box a {font-size:28px;text-decoration:none;}
#clock{margin-left:48px;}
#clock .digit {font-size:64px;}
#canvas{margin:0 auto;width:1100px;height:680px;display:block;border-radius:10px;box-shadow:0 10px 40px rgba(255,105,135,0.2);}
#error{margin:0 auto;text-align:center;margin-top:60px;display:none;}
.hand{cursor:pointer;}
.say{margin-left:5px;text-shadow:1px 1px 2px rgba(255,255,255,0.8);font-weight:500;color:#FF1493;}
.space{margin-right:150px;}

/* 响应式设计 - 手机端适配 */
@media screen and (max-width: 768px) {
    #wrap {
        width: 100vw;
        height: 70vh;
        margin-top: 5px;
    }

    #canvas {
        width: 100%;
        height: 100%;
        border-radius: 8px;
    }

    #text {
        width: 90%;
        left: 5%;
        top: 10px;
        height: auto;
        max-height: 40%;
        background: rgba(255, 255, 255, 0.85);
        padding: 10px;
        border-radius: 10px;
        backdrop-filter: blur(5px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    #code {
        font-size: 12px;
        line-height: 1.5;
    }

    #clock-box {
        left: 5%;
        top: auto;
        bottom: 10px;
        font-size: 14px;
        width: 90%;
        text-align: center;
        background: rgba(255, 255, 255, 0.9);
        padding: 8px;
        border-radius: 10px;
        backdrop-filter: blur(5px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    #clock-box a {
        font-size: 14px;
    }

    #clock {
        margin-left: 0;
        margin-top: 8px;
    }

    #clock .digit {
        font-size: 28px;
    }

    .say {
        margin-left: 2px;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 1);
        color: #FF1493;
        font-weight: 500;
    }

    .space {
        margin-right: 10px;
    }

    /* 手机端减少爱心 */
    .falling-heart {
        font-size: 14px !important;
        opacity: 0.4 !important;
    }
}

@media screen and (max-width: 480px) {
    #code {
        font-size: 11px;
        line-height: 1.5;
    }

    #clock-box {
        font-size: 14px;
    }

    #clock-box a {
        font-size: 14px;
    }

    #clock .digit {
        font-size: 24px;
    }
}

/* 音乐控制按钮 */
#music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,105,135,0.8);
    border: 2px solid #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(255,105,135,0.4);
    transition: all 0.3s ease;
}

#music-control:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255,105,135,0.6);
}

#music-control.playing {
    animation: rotate 3s linear infinite;
}

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

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#music-control svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* 飘落的爱心 */
.falling-heart {
    position: fixed;
    top: -50px;
    color: #ff6b8a;
    font-size: 20px;
    animation: fall linear forwards;
    z-index: 999;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(255,107,138,0.5);
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* 设置按钮 */
#settings-btn {
    position: fixed;
    top: 20px;
    right: 85px;
    z-index: 1000;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,182,193,0.9);
    border: 2px solid #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255,182,193,0.4);
    transition: all 0.3s ease;
}

#settings-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255,182,193,0.6);
}

#settings-btn svg {
    width: 22px;
    height: 22px;
    fill: white;
}

/* 手机端按钮优化 */
@media screen and (max-width: 768px) {
    #music-control {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }

    #music-control svg {
        width: 20px;
        height: 20px;
    }

    #settings-btn {
        width: 36px;
        height: 36px;
        top: 15px;
        right: 65px;
    }

    #settings-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* 设置弹窗 */
#settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

#settings-modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #FF1493;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #FFB6C1;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #FF1493;
}

.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #FFB6C1;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    background: white;
    cursor: pointer;
}

.input-group select:focus {
    outline: none;
    border-color: #FF1493;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.primary {
    background: linear-gradient(135deg, #FF1493, #FF69B4);
    color: white;
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,20,147,0.4);
}

.modal-btn.secondary {
    background: #f0f0f0;
    color: #666;
}

.modal-btn.secondary:hover {
    background: #e0e0e0;
}
