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

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at 20% 30%, #0a0a2a, #020210);
    color: #e0e0ff;
    min-height: 100vh;
}

.navbar {
    background: rgba(10, 10, 30, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(100, 100, 200, 0.3);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: #8b5cf6;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #c7c7ff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #ffffff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.input-card {
    background: rgba(20, 20, 50, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #c4c4ff;
}

.form-group textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.3rem;
}

.model-select {
    width: 100%;
    padding: 0.8rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

.generate-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border: none;
    border-radius: 40px;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 0.5rem;
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.generate-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4);
}

.result-section {
    margin-top: 2rem;
}

.style-card {
    margin-bottom: 1.5rem;
}

.result-card {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    padding: 1.5rem;
    border-left: 4px solid #8b5cf6;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.copy-btn {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid #8b5cf6;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

.copy-btn:hover {
    background: #8b5cf6;
}

.prompt-box {
    background: #0a0a1a;
    padding: 1rem;
    border-radius: 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid #2d2d5e;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
}

.lyrics-box pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    border-radius: 16px;
    padding: 1rem;
    margin-top: 1rem;
    color: #ffb3b3;
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.8rem 1.5rem;
    border-radius: 40px;
    background: #1e1b4b;
    color: white;
    z-index: 2000;
    animation: fadeInOut 2s ease;
}

.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}

.about-section {
    background: rgba(20, 20, 50, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.about-section h2 {
    margin-bottom: 1rem;
    color: #c4c4ff;
}

.about-section p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: #d1d1ff;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1e1b2e;
    padding: 2rem;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 35px rgba(0,0,0,0.5);
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.8rem;
    cursor: pointer;
}

.modal-input {
    width: 100%;
    padding: 0.8rem;
    margin: 0.8rem 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    box-sizing: border-box;
}

.modal-btn {
    width: 100%;
    padding: 0.8rem;
    background: #8b5cf6;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin-top: 0.5rem;
}

.modal-footer {
    margin-top: 1rem;
    text-align: center;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .container {
        padding: 0 1rem;
    }
    .input-card {
        padding: 1.2rem;
    }
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* 历史记录样式 */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.history-card {
    background: rgba(20, 20, 50, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    cursor: pointer;
    transition: 0.2s;
}
.history-card:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateX(4px);
}
.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.history-type {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}
.type-prompt { background: #8b5cf6; }
.type-lyrics { background: #10b981; }
.history-time { font-size: 0.75rem; color: #aaa; }
.history-prompt, .history-preview {
    font-size: 0.85rem;
    margin-top: 0.3rem;
    color: #ddd;
}
.detail-section {
    margin-bottom: 1rem;
}
.detail-box {
    background: #0a0a1a;
    padding: 0.8rem;
    border-radius: 12px;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid #2d2d5e;
    margin-top: 0.3rem;
}
.pre-wrap {
    white-space: pre-wrap;
}
.loading {
    text-align: center;
    padding: 2rem;
    color: #aaa;
}
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #aaa;
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}
