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

:root {
    --cyan: #00ffd5;
    --purple: #b44aff;
    --pink: #ff2d95;
    --bg: #0a0a0f;
    --card: rgba(15, 15, 25, 0.85);
    --border: rgba(0, 255, 213, 0.2);
    --text: #e0e0e0;
    --text-dim: #888;
    --glow-cyan: 0 0 10px rgba(0, 255, 213, 0.3), 0 0 20px rgba(0, 255, 213, 0.1);
    --glow-purple: 0 0 10px rgba(180, 74, 255, 0.3), 0 0 20px rgba(180, 74, 255, 0.1);
}

/* 锁屏 */
.lock-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(circle at 50% 40%, rgba(0, 255, 213, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 30% 70%, rgba(180, 74, 255, 0.04) 0%, transparent 50%);
}

.lock-screen.hidden {
    display: none;
}

.lock-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.lock-avatar {
    font-size: 56px;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--cyan);
    box-shadow: 0 0 30px rgba(0, 255, 213, 0.2);
}

.lock-title {
    font-size: 28px;
    color: var(--cyan);
    text-shadow: 0 0 15px rgba(0, 255, 213, 0.4);
}

.lock-subtitle {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.lock-input {
    width: 260px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text);
    font-size: 15px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}

.lock-input:focus {
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.lock-btn {
    width: 260px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border: none;
    color: #000;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: opacity 0.2s;
}

.lock-btn:hover {
    opacity: 0.85;
}

.lock-error {
    font-size: 13px;
    color: var(--pink);
    height: 18px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0, 255, 213, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(180, 74, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(255, 45, 149, 0.02) 0%, transparent 50%);
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 213, 0.008) 2px,
        rgba(0, 255, 213, 0.008) 4px
    );
}

.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100vh;
}

/* DJ 区域 */
.dj-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.dj-section:hover {
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.dj-avatar {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(var(--cyan), var(--purple), var(--pink), var(--cyan));
    opacity: 0.6;
    animation: spin 4s linear infinite;
    filter: blur(3px);
}

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

.avatar-icon {
    position: relative;
    width: 48px;
    height: 48px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1;
}

.dj-info {
    flex: 1;
}

.dj-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 255, 213, 0.3);
}

.dj-status {
    font-size: 13px;
    color: var(--text-dim);
}

.settings-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.settings-btn:hover {
    border-color: var(--purple);
    color: var(--purple);
    box-shadow: var(--glow-purple);
}

/* 天气 & 时间 */
.weather-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.weather-city {
    color: var(--cyan);
}

.weather-temp {
    font-size: 18px;
    font-weight: 600;
}

.weather-desc {
    color: var(--text-dim);
}

.time-display {
    font-family: 'Courier New', monospace;
    font-size: 22px;
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(0, 255, 213, 0.4);
    letter-spacing: 2px;
}

/* 播放器 */
.player-section {
    padding: 20px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.player-info {
    text-align: center;
    margin-bottom: 12px;
}

.song-title {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.song-artist {
    font-size: 13px;
    color: var(--text-dim);
}

.progress-bar {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s linear;
    box-shadow: 0 0 6px rgba(0, 255, 213, 0.4);
}

.progress-input {
    position: absolute;
    top: -6px;
    left: 0;
    width: 100%;
    height: 16px;
    opacity: 0;
    cursor: pointer;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 14px;
    font-family: 'Courier New', monospace;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.ctrl-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.play-btn {
    width: 52px;
    height: 52px;
    font-size: 20px;
    border-color: var(--cyan);
    color: var(--cyan);
}

/* 聊天窗口 */
.chat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    min-height: 300px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.chat-msg {
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 85%;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
}

.chat-msg.dj {
    background: rgba(0, 255, 213, 0.06);
    border: 1px solid rgba(0, 255, 213, 0.15);
    align-self: flex-start;
}

.chat-msg.user {
    background: rgba(180, 74, 255, 0.08);
    border: 1px solid rgba(180, 74, 255, 0.15);
    align-self: flex-end;
}

.chat-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-msg-role {
    font-size: 11px;
    color: var(--cyan);
    font-weight: 600;
}

.chat-msg.user .chat-msg-role {
    color: var(--purple);
}

.chat-msg-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.chat-msg:hover .chat-msg-actions {
    opacity: 1;
}

.msg-action-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
}

.msg-action-btn:hover {
    color: var(--pink);
}

.chat-msg-time {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--cyan);
}

.send-btn {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border: none;
    color: #000;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
}

.send-btn:hover {
    opacity: 0.85;
}

/* 弹窗 */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #12121a;
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 255, 213, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 18px;
    color: var(--cyan);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--pink);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-group label {
    font-size: 13px;
    color: var(--text-dim);
}

.setting-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.setting-group input:focus {
    border-color: var(--cyan);
}

.save-btn {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border: none;
    color: #000;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    margin-top: 8px;
}

.save-btn:hover {
    opacity: 0.85;
}

/* 歌单列表 */
.playlist-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.playlist-item:hover {
    border-color: var(--cyan);
    background: rgba(0, 255, 213, 0.04);
}

.playlist-item.active {
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.playlist-item-name {
    font-size: 14px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-item-del {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
}

.playlist-item-del:hover {
    color: var(--pink);
}

/* DJ 语音下载按钮 */
.voice-download-btn {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--cyan);
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.7;
}

.voice-download-btn:hover {
    opacity: 1;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 编辑消息输入框 */
.edit-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--cyan);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    margin-top: 4px;
}

/* 头像上传行 */
.avatar-upload-row {
    display: flex;
    gap: 8px;
}

.avatar-upload-row input {
    flex: 1;
}

.upload-avatar-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.upload-avatar-btn:hover {
    border-color: var(--cyan);
}

/* 播报界面 */
.broadcast-view {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 2000;
    flex-direction: column;
    padding: 20px;
    background-image:
        radial-gradient(circle at 50% 30%, rgba(0, 255, 213, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 30% 70%, rgba(180, 74, 255, 0.03) 0%, transparent 50%);
}

.broadcast-view.active {
    display: flex;
}

.broadcast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.broadcast-back {
    background: none;
    border: none;
    color: var(--cyan);
    font-size: 14px;
    cursor: pointer;
}

.broadcast-download {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.broadcast-download:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.broadcast-dj {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
}

.broadcast-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 255, 213, 0.1);
    border: 2px solid var(--cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 0 20px rgba(0, 255, 213, 0.3);
}

.broadcast-dj-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 255, 213, 0.3);
}

.broadcast-status {
    font-size: 13px;
    color: #4ade80;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.broadcast-waveform {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.broadcast-waveform canvas {
    max-width: 100%;
    height: 80px;
    opacity: 0.8;
}

.broadcast-text {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
}

.broadcast-en {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 16px;
}

.broadcast-divider {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.broadcast-zh {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-dim);
}

.broadcast-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.broadcast-time {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-dim);
    min-width: 36px;
}

.broadcast-progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.broadcast-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-radius: 2px;
    transition: width 0.3s linear;
}

.broadcast-play-btn {
    background: none;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.broadcast-play-btn:hover {
    box-shadow: var(--glow-cyan);
}

/* 历史记录列表 */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: var(--cyan);
    background: rgba(0, 255, 213, 0.04);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.history-item-song {
    font-size: 14px;
    color: var(--cyan);
    font-weight: 500;
}

.history-item-time {
    font-size: 11px;
    color: var(--text-dim);
}

.history-item-text {
    font-size: 13px;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 40px 0;
    font-size: 14px;
}
