* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b6b;
    --bg-color: #1a1a2e;
    --text-color: #fff;
    --secondary-bg: #16213e;
    --accent-color: #e94560;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 页面切换 */
.page {
    display: none;
    min-height: 100vh;
    width: 100%;
}

.page.active {
    display: block;
}

/* 首页样式 */
.app-header {
    padding: 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

/* 主导航 */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

/* AI创作页面样式 */
.ai-create-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.ai-create-section,
.ai-result-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.ai-create-section h2,
.ai-result-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    width: auto;
    margin: 0;
}

/* 滑块组 */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.slider-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-item span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 100px;
}

.slider-item input[type="range"] {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}

.slider-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.3);
}

.slider-item input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.3);
}

/* 生成按钮 */
.generate-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.25);
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.generate-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 加载容器 */
.loading-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 结果容器 */
.result-container {
    display: none;
}

.result-item {
    text-align: center;
}

.result-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
}

.result-audio {
    margin-bottom: 20px;
}

.result-audio audio {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
}

.result-cover {
    margin: 20px 0;
}

.result-cover img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.result-info {
    margin: 20px 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.result-info p {
    font-size: 14px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.result-info span {
    color: var(--text-color);
    font-weight: 500;
}

.result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.action-btn:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (min-width: 768px) {
    .ai-create-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .ai-create-section,
    .ai-result-section {
        margin-bottom: 0;
    }
}

/* 分类导航 */
.category-nav {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-item {
    flex-shrink: 0;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-item:hover {
    background: rgba(233, 69, 96, 0.3);
    transform: translateY(-2px);
}

.category-item.active {
    background: linear-gradient(135deg, #e94560, #ff6b81);
    color: white;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

.category-name {
    font-size: 14px;
    font-weight: 500;
}

/* 瀑布流容器 */
.waterfall-container {
    display: flex;
    gap: 15px;
    padding: 15px;
    padding-bottom: 30px;
}

.waterfall-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 杂志封面卡片 */
.song-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--secondary-bg);
    aspect-ratio: 3/4;
}

.song-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.3);
}

.song-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.song-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.song-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card-artist {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(233, 69, 96, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.play-icon::after {
    content: '▶';
    font-size: 20px;
    margin-left: 3px;
}

.song-card:hover .play-icon {
    opacity: 1;
}

/* 播放页面样式 */
#player-page {
    background: linear-gradient(180deg, #2d1b4e 0%, #1a1a2e 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
}

.song-info-header {
    text-align: center;
    flex: 1;
}

.song-info-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 3px;
}

.song-info-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.player-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
}

/* 专辑封面 */
.album-cover-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    flex-shrink: 0;
}

.album-cover-container img {
    width: 220px;
    height: 293px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    aspect-ratio: 3/4;
}

/* 播放控制 */
.player-controls {
    padding: 20px 0;
    flex-shrink: 0;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.progress-container span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 40px;
    text-align: center;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: var(--text-color);
    border-radius: 50%;
    left: 0%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: grab;
    transition: left 0.1s linear;
}

.progress-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.2);
}

.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.play-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--text-color);
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 35px rgba(233, 69, 96, 0.5);
}

.play-btn:active {
    transform: scale(0.95);
}

/* 歌词容器 */
.lyrics-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    margin-top: 10px;
}

.lyrics-wrapper {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 15%,
        black 85%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 15%,
        black 85%,
        transparent 100%
    );
}

.lyrics-wrapper::-webkit-scrollbar {
    display: none;
}

.lyrics-list {
    padding: 120px 20px;
    text-align: center;
}

.lyric-line {
    font-size: 16px;
    line-height: 2.2;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    padding: 5px 0;
}

.lyric-line.active {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    text-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
}

.lyric-line.passed {
    color: rgba(255, 255, 255, 0.7);
}

/* 歌词编辑模式样式 */
.lyric-line:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* 防止音乐下载 */
audio {
    display: none;
}

/* 响应式优化 */
@media (max-width: 380px) {
    .album-cover-container img {
        width: 180px;
        height: 240px;
    }
    
    .control-buttons {
        gap: 30px;
    }
    
    .play-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.song-card.playing {
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
}

.song-card.playing .play-icon {
    opacity: 1;
    background: var(--accent-color);
}

.song-card.playing .play-icon::after {
    content: '♪';
}

/* 悬浮联系按钮 */
.contact-float-btn {
    position: fixed;
    right: 15px;
    bottom: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 12px 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.contact-float-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

.contact-float-btn:active {
    transform: scale(0.95);
}

.contact-icon {
    width: 20px;
    height: 20px;
    color: white;
}

.contact-text {
    white-space: nowrap;
}

/* 联系弹窗 */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.contact-modal.active {
    display: flex;
}

.contact-modal-content {
    background: linear-gradient(135deg, #2d1b4e 0%, #1a1a2e 100%);
    border-radius: 20px;
    width: 100%;
    max-width: 340px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.contact-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.contact-modal-body {
    padding: 20px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.contact-value {
    font-size: 16px;
    color: white;
    font-weight: 500;
}

.contact-link {
    font-size: 16px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--accent-color);
}

/* 微信复制 */
.wechat-copy {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 0;
    transition: all 0.3s ease;
}

.wechat-copy:active {
    opacity: 0.7;
}

.copy-hint {
    font-size: 12px;
    color: var(--primary-color);
    background: rgba(233, 69, 96, 0.15);
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: normal;
    transition: all 0.3s ease;
}

.wechat-copy:hover .copy-hint {
    background: rgba(233, 69, 96, 0.3);
}

.copy-hint.copied {
    background: #4CAF50;
    color: white;
}

/* 我要制作表单 */
.contact-form-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 20px;
}

.form-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-title::before {
    content: '🎵';
    font-size: 20px;
}

.order-form .form-group {
    margin-bottom: 16px;
}

.order-form input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.order-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.order-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.25);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 表单提交成功提示 */
.form-success {
    text-align: center;
    padding: 30px 20px;
    color: #4CAF50;
}

.form-success-icon {
    font-size: 64px;
    margin-bottom: 15px;
    display: block;
}

.form-success p {
    font-size: 16px;
    font-weight: 500;
}

/* 复制提示弹窗 */
.copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.copy-toast.show {
    opacity: 1;
}
