:root {
    --primary-color: rgba(255, 255, 255, 0.1);
    --secondary-color: rgba(255, 255, 255, 0.05);
    --text-color: #ffffff;
    --card-background: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', sans-serif;
}

body {
    min-height: 100vh;
    background: #000;
    color: var(--text-color);
    overflow-x: hidden;
}

/* 一言顶栏样式 */
.yiyan-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: var(--card-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    z-index: 100;
    box-shadow: var(--card-shadow);
}

#yiyan-text {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.container {
    max-width: 1400px;
    margin: 4rem auto 2rem;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    min-height: 100vh;
}

.card {
    background: var(--card-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

/* 拖拽相关样式 */
.draggable {
    cursor: move;
}

.draggable:active {
    cursor: grabbing;
}

.card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    z-index: 1000;
}

.card.drag-over {
    border: 2px dashed var(--text-color);
    background: rgba(255, 255, 255, 0.2);
}

.card-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-color);
}

/* 音乐播放器样式 */
.music-card {
    grid-column: span 2;
    min-height: 400px;
}

.music-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.music-status {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.music-status h2 {
    font-size: 1.2rem;
    margin: 0;
}

.music-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-text {
    font-size: 0.8rem;
    opacity: 0.7;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
    transition: background 0.3s ease;
}

.status-dot.loading {
    background: #ffa500;
    animation: pulse 1.5s infinite;
}

.status-dot.playing {
    background: #22c55e;
    animation: pulse 2s infinite;
}

.status-dot.paused {
    background: #f59e0b;
}

.status-dot.error {
    background: #ef4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.music-controls-compact {
    display: flex;
    gap: 0.5rem;
}

.control-btn-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.control-btn-small:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.control-btn-small.active {
    background: rgba(34, 197, 94, 0.8);
    color: white;
}

.music-info-compact {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.music-cover-small {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

#music-cover {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.music-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
}

.music-loading.show {
    display: flex;
}

.music-details {
    flex: 1;
    min-width: 0;
}

.music-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

#music-title {
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.playlist-selector-small {
    background: var(--secondary-color);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    color: var(--text-color);
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    cursor: pointer;
    flex-shrink: 0;
}

#music-artist {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 0 0 0.8rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: rgba(34, 197, 94, 0.8);
    width: 0%;
    transition: width 0.3s ease;
}

.time-display {
    font-size: 0.7rem;
    opacity: 0.6;
    white-space: nowrap;
}

/* 播放列表样式 */
.playlist-container {
    margin-top: 1rem;
    border-top: 1px solid var(--card-border);
    padding-top: 1rem;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.playlist-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
}

.playlist-loading {
    font-size: 0.8rem;
    color: #ffa500;
    display: none;
}

.playlist-loading.show {
    display: block;
}

.playlist-items {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 8px;
    background: var(--secondary-color);
}

.playlist-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-color);
    opacity: 0.6;
    font-style: italic;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.3s ease;
}

.playlist-item:last-child {
    border-bottom: none;
}

.playlist-item:hover {
    background: var(--primary-color);
}

.playlist-item.playing {
    background: rgba(34, 197, 94, 0.2);
    border-left: 3px solid #22c55e;
}

.playlist-item.error {
    background: rgba(239, 68, 68, 0.2);
    opacity: 0.6;
}

.playlist-item-index {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    margin-right: 0.8rem;
    flex-shrink: 0;
}

.playlist-item.playing .playlist-item-index {
    background: #22c55e;
    color: white;
}

.playlist-item-info {
    flex: 1;
    min-width: 0;
}

.playlist-item-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-meta {
    font-size: 0.7rem;
    opacity: 0.7;
    display: flex;
    gap: 0.5rem;
}

.playlist-item-source {
    background: rgba(74, 144, 226, 0.8);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.6rem;
}

.playlist-item-status {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.playlist-item-status i {
    font-size: 0.8rem;
}

.playlist-item.loading .playlist-item-status i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 天气预报样式 */
.weather-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.current-weather {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.weather-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.weather-location h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.current-date {
    font-size: 0.9rem;
    opacity: 0.7;
}

.weather-temp {
    text-align: right;
}

.weather-icon-temp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

#weather-icon {
    font-size: 2rem;
}

#current-temp {
    font-size: 2.5rem;
    font-weight: 300;
}

#weather-desc {
    font-size: 1rem;
    opacity: 0.8;
    display: block;
    margin-top: 0.3rem;
}

/* 天气图标颜色 */
.weather-icon.sunny {
    color: #FFD700;
}

.weather-icon.cloudy {
    color: #A9A9A9;
}

.weather-icon.rainy {
    color: #1E90FF;
}

.weather-icon.snowy {
    color: #FFFFFF;
}

.weather-icon.thunder {
    color: #FFA500;
}

.weather-icon.foggy {
    color: #D3D3D3;
}

.weather-icon.windy {
    color: #87CEEB;
}

.weather-icon.overcast {
    color: #696969;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    padding: 1rem;
    background: var(--secondary-color);
    border-radius: 10px;
}

.weather-detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.weather-detail-item i {
    width: 16px;
    opacity: 0.7;
}

.forecast {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.forecast-day {
    text-align: center;
    padding: 1rem;
    background: var(--secondary-color);
    border-radius: 10px;
}

.forecast-day h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.forecast-day p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 摸鱼日历样式 */
.moyu-card {
    grid-column: span 1;
}

.moyu-preview {
    width: 100%;
    border-radius: 10px;
    margin-top: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.moyu-preview:hover {
    transform: scale(1.02);
}

/* AI聊天助手样式 */
.ai-chat-card {
    grid-column: span 1;
    min-height: 400px;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 350px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-radius: 10px;
    background: var(--secondary-color);
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.message-content {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.ai-message .message-content {
    background: var(--primary-color);
    margin-left: 0;
}

.user-message .message-content {
    background: rgba(74, 144, 226, 0.8);
    margin-left: auto;
    text-align: right;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
}

#chat-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--card-border);
    border-radius: 25px;
    background: var(--secondary-color);
    color: var(--text-color);
    font-size: 0.9rem;
    outline: none;
}

#chat-input:focus {
    border-color: var(--text-color);
}

.send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.8);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    background: rgba(74, 144, 226, 1);
    transform: scale(1.1);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 网页链接嗅探样式 */
.link-sniffer-card {
    grid-column: span 1;
    min-height: 400px;
}

.sniffer-container {
    display: flex;
    flex-direction: column;
    height: 350px;
}

.sniffer-input-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#sniffer-url {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: var(--secondary-color);
    color: var(--text-color);
    font-size: 0.9rem;
    outline: none;
}

#sniffer-url:focus {
    border-color: var(--text-color);
}

.sniff-btn {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.8);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.sniff-btn:hover {
    background: rgba(34, 197, 94, 1);
    transform: translateY(-2px);
}

.sniff-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sniffer-results {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    border-radius: 10px;
    background: var(--secondary-color);
    font-size: 0.9rem;
}

.sniffer-placeholder {
    text-align: center;
    opacity: 0.6;
    font-style: italic;
}

.resource-category {
    margin-bottom: 1rem;
}

.resource-category h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.3rem;
}

.resource-list {
    list-style: none;
    padding: 0;
}

.resource-list li {
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    word-break: break-all;
}

.resource-list li:last-child {
    border-bottom: none;
}

.resource-list a {
    color: rgba(74, 144, 226, 0.9);
    text-decoration: none;
    font-size: 0.8rem;
}

.resource-list a:hover {
    color: rgba(74, 144, 226, 1);
    text-decoration: underline;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover {
    color: #bbb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }

    .music-card,
    .moyu-card,
    .ai-chat-card,
    .link-sniffer-card {
        grid-column: span 1;
    }

    .music-card {
        min-height: 350px;
    }

    .playlist-items {
        max-height: 150px;
    }

    .forecast {
        grid-template-columns: 1fr;
    }

    .weather-details {
        grid-template-columns: 1fr;
    }

    .weather-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .weather-temp {
        text-align: left;
    }

    .music-info-compact {
        flex-direction: column;
        gap: 0.8rem;
    }

    .music-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .music-controls-compact {
        justify-content: center;
    }

    .weather-icon-temp {
        justify-content: flex-start;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .ai-chat-card,
    .link-sniffer-card {
        min-height: 300px;
    }

    .chat-container,
    .sniffer-container {
        height: 250px;
    }
}

/* 天气图标样式 */
.weather-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    color: #fff;
}

.weather-icon.sunny {
    color: #FFD700;
}

.weather-icon.cloudy {
    color: #A9A9A9;
}

.weather-icon.rainy {
    color: #1E90FF;
}

.weather-icon.snowy {
    color: #FFFFFF;
}

.weather-icon.thunder {
    color: #FFA500;
}

.weather-icon.foggy {
    color: #D3D3D3;
}

/* 天气信息容器样式 */
.weather-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.weather-details {
    flex: 1;
} 