@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&display=swap');

html {
    height: 100%;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    height: 100%;
    /* 防止拖动时选中页面其他元素 */
    user-select: none; 
    -webkit-user-select: none;
}

#app-window {
    position: absolute;
    top: 60px;
    left: 80px;
    width: 340px;
    height: 500px;
    min-width: 280px;
    min-height: 200px;
    max-width: 95vw;
    max-height: 95vh;
    background: linear-gradient(135deg, #fff5f7 0%, #fde6e8 100%);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(150, 100, 100, 0.2), 0 0 30px rgba(229, 152, 155, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#app-header {
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#app-title {
    color: #b0797e;
    font-weight: 700;
    font-size: 0.9em;
}

#song-selector {
    border: 1px solid #e6c1c3;
    background: #ffffff;
    border-radius: 6px;
    padding: 4px 8px;
    color: #b0797e;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 0.85em;
    font-weight: 700;
    max-width: 150px;
}

#song-selector:focus {
    outline: none;
    border-color: #e5989b;
    box-shadow: 0 0 0 1px #e5989b, 0 0 10px rgba(229, 152, 155, 0.7);
}

#lyrics-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 5px 20px;
}

#app-footer {
    background: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    padding: 8px 0;
    flex-shrink: 0;
    font-size: 0.8em;
    color: #c79ea3;
    font-weight: 400;
}

#lyrics-container::-webkit-scrollbar {
    width: 8px;
}

#lyrics-container::-webkit-scrollbar-track {
    background: rgba(253, 230, 232, 0.1);
    border-radius: 10px;
}

#lyrics-container::-webkit-scrollbar-thumb {
    background: #e6c1c3;
    border-radius: 10px;
}

#lyrics-container::-webkit-scrollbar-thumb:hover {
    background: #e5989b;
}

#lyrics-content {
    white-space: pre-wrap;
    font-size: 1.2em;
    line-height: 1.8;
    color: #4a4a4a;
    font-weight: 700;
    padding-top: 10px;
    animation: fadeInLyrics 0.5s forwards;
}

@keyframes fadeInLyrics {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resizer {
    position: absolute;
    width: 10px;
    height: 10px;
    background: transparent;
    z-index: 10;
}
.resizer-t {
    top: -5px;
    left: 5px;
    right: 5px;
    height: 10px;
    cursor: ns-resize;
    width: auto;
}
.resizer-r {
    top: 5px;
    right: -5px;
    bottom: 5px;
    width: 10px;
    cursor: ew-resize;
    height: auto;
}
.resizer-b {
    bottom: -5px;
    left: 5px;
    right: 5px;
    height: 10px;
    cursor: ns-resize;
    width: auto;
}
.resizer-l {
    top: 5px;
    left: -5px;
    bottom: 5px;
    width: 10px;
    cursor: ew-resize;
    height: auto;
}
.resizer-tl {
    top: -5px;
    left: -5px;
    cursor: nwse-resize;
}
.resizer-tr {
    top: -5px;
    right: -5px;
    cursor: nesw-resize;
}
.resizer-bl {
    bottom: -5px;
    left: -5px;
    cursor: nesw-resize;
}
.resizer-br {
    bottom: -5px;
    right: -5px;
    cursor: nwse-resize;
}

.song-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

#add-song-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e6c1c3;
    background: #fff;
    color: #b0797e;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 2px;
}

#add-song-btn:hover {
    background-color: #fcecf0;
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(229, 152, 155, 0.8);
}

#edit-song-btn, #delete-song-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e6c1c3;
    background: #fff;
    color: #b0797e;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

#edit-song-btn:hover, #delete-song-btn:hover {
    background-color: #fcecf0;
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(229, 152, 155, 0.8);
}

#edit-song-btn:disabled, #delete-song-btn:disabled {
    background-color: #f8f8f8;
    color: #ccc;
    border-color: #eee;
    cursor: not-allowed;
    transform: none;
}

/* 模态框样式 */
#add-song-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.3s ease;
}

.modal-hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: #fffafb;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

#add-song-modal:not(.modal-hidden) .modal-content {
    transform: scale(1);
}

.modal-content h2 {
    margin: 0;
    font-size: 1.3em;
    color: #b0797e;
    text-align: center;
}

.modal-content input,
.modal-content textarea {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #f0d9de;
    border-radius: 8px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1em;
}

.modal-content textarea {
    height: 200px;
    resize: vertical;
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: #e5989b;
    box-shadow: 0 0 0 1px #e5989b, 0 0 10px rgba(229, 152, 155, 0.7);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.modal-actions button {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

#cancel-add-song {
    background-color: #f1f1f1;
    color: #666;
}

#cancel-add-song:hover {
    background-color: #e0e0e0;
}

#save-song {
    background-color: #b0797e;
    color: white;
}

#save-song:hover {
    background-color: #a0696e;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(160, 105, 110, 0.5);
}

#delete-confirm-message {
    text-align: center;
    font-size: 1.1em;
    color: #4a4a4a;
    margin: 10px 0 20px 0;
    line-height: 1.6;
}

#delete-confirm-message strong {
    color: #b0797e;
    font-weight: 700;
}

#cancel-delete {
    background-color: #f1f1f1;
    color: #666;
}
#cancel-delete:hover {
    background-color: #e0e0e0;
}

#confirm-delete {
    background-color: #d46a6a;
    color: white;
}
#confirm-delete:hover {
    background-color: #c05656;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(192, 86, 86, 0.5);
}

#lock-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e6c1c3;
    background: #fff;
    color: #b0797e;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

#lock-btn.locked, #lock-btn:hover {
    background-color: #fcecf0;
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(229, 152, 155, 0.8);
}

#app-window.locked #app-header {
    cursor: default;
}

#app-window.locked .resizer {
    display: none;
}

/* 提示框样式 */
#toast-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(40, 40, 40, 0.85);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    z-index: 200;
    font-size: 1.1em;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
}

#toast-notification.toast-hidden {
    opacity: 0;
    transform: translate(-50%, -30%);
    pointer-events: none;
} 