* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0c0c2e 0%, #1a1a3e 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.8rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #ff3366, #ff9933, #33ccff, #9933ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgba(255, 51, 102, 0.5);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    font-family: 'Fire Code', monospace;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.controls {
    flex: 1;
    min-width: 300px;
    background: rgba(20, 20, 50, 0.7);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group:last-child {
    border-bottom: none;
}

.control-group h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #33ccff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-item {
    margin-bottom: 20px;
}

.control-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.control-item select, .control-item input[type="range"] {
    width: 100%;
    padding: 12px;
    background: rgba(10, 10, 30, 0.8);
    border: 1px solid #33ccff;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.launch-btn {
    background: linear-gradient(135deg, #ff3366, #ff0066);
    color: white;
    flex: 1;
}

.launch-btn:hover {
    background: linear-gradient(135deg, #ff0066, #cc0052);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 0, 102, 0.4);
}

.auto-btn {
    background: linear-gradient(135deg, #33ccff, #0099cc);
    color: white;
    flex: 1;
}

.auto-btn:hover {
    background: linear-gradient(135deg, #0099cc, #006699);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 153, 204, 0.4);
}

.clear-btn {
    background: linear-gradient(135deg, #9933ff, #6600cc);
    color: white;
    flex: 1;
}

.clear-btn:hover {
    background: linear-gradient(135deg, #6600cc, #4d0099);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 0, 204, 0.4);
}

.music-controls {
    background: rgba(10, 10, 30, 0.5);
    padding: 20px;
    border-radius: 10px;
}

.music-btn {
    background: linear-gradient(135deg, #ff9933, #ff6600);
    color: white;
    width: 100%;
    margin-bottom: 20px;
}

.music-btn:hover {
    background: linear-gradient(135deg, #ff6600, #cc5200);
    transform: translateY(-3px);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.volume-control label {
    min-width: 50px;
}

.music-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 65%;
    background: linear-gradient(90deg, #ff3366, #ff9933);
    border-radius: 4px;
    animation: progressMove 3s infinite linear;
}

@keyframes progressMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

.timer-display {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.2), rgba(51, 204, 255, 0.2));
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-top: 20px;
}

.timer {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #ff3366;
    text-shadow: 0 0 15px rgba(255, 51, 102, 0.7);
    margin: 15px 0;
}

.timer-note {
    font-size: 1rem;
    opacity: 0.8;
}

.fireworks-container {
    flex: 2;
    min-width: 300px;
    height: 600px;
    background: rgba(5, 5, 20, 0.8);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#fireworksCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.instructions {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 10px;
    margin: 0 20px;
}

.instructions p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #33ccff;
}

.footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.share-btn {
    background: transparent;
    border: 1px solid #33ccff;
    color: #33ccff;
    padding: 8px 20px;
    border-radius: 20px;
    margin-left: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.share-btn:hover {
    background: #33ccff;
    color: #0c0c2e;
}

.hint {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 10px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a3e, #0c0c2e);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(51, 204, 255, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    cursor: pointer;
    color: #ff3366;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #33ccff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-link {
    display: flex;
    margin: 20px 0;
}

#shareUrl {
    flex: 1;
    padding: 12px;
    background: rgba(10, 10, 30, 0.8);
    border: 1px solid #33ccff;
    border-radius: 8px 0 0 8px;
    color: white;
}

.copy-btn {
    background: linear-gradient(135deg, #9933ff, #6600cc);
    color: white;
    border-radius: 0 8px 8px 0;
    padding: 12px 20px;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #6600cc, #4d0099);
}

.qr-code {
    text-align: center;
    margin: 30px 0;
}

.qr-placeholder {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 10px;
    display: inline-block;
}

.qr-placeholder i {
    font-size: 100px;
    color: #33ccff;
    margin-bottom: 15px;
}

.share-note {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 1100px) {
    .main-content {
        flex-direction: column;
    }
    
    .fireworks-container {
        height: 500px;
    }
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .timer {
        font-size: 2.5rem;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    .share-link {
        flex-direction: column;
    }
    
    #shareUrl {
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    .copy-btn {
        border-radius: 8px;
    }
}