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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

h1 {
    color: #2c3e50;
    margin: 0;
}

.header-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.header-title h1 {
    flex: 1;
    text-align: center;
}

.theme-toggle {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #3498db;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.theme-toggle:hover {
    background-color: #f0f0f0;
}

.theme-icon-light,
.theme-icon-dark {
    position: absolute;
    transition: opacity 0.3s;
}

.theme-icon-dark {
    opacity: 0;
}

body.dark-theme .theme-icon-light {
    opacity: 0;
}

body.dark-theme .theme-icon-dark {
    opacity: 1;
}

.info-button {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #3498db;
    background-color: #fff;
    color: #3498db;
    font-weight: bold;
    font-style: italic;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.info-button:hover {
    background-color: #3498db;
    color: #fff;
}

.info-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.info-popup.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-popup-content {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.info-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
}

.info-popup-close:hover {
    color: #333;
}

.info-popup h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

.info-item {
    margin-bottom: 15px;
    font-size: 16px;
}

.info-item strong {
    color: #495057;
}

.request-song-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.request-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.request-artist {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #2980b9;
}

.submit-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.request-feedback {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.request-feedback.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.request-feedback.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

#searchInput {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#searchInput:focus {
    outline: none;
    border-color: #3498db;
}

#sortBy {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
    cursor: pointer;
}


.content-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.alpha-nav {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-buttons-container,
.letter-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.alpha-nav button {
    width: 40px;
    height: 40px;
    border: none;
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.alpha-nav button:hover {
    background-color: #3498db;
    color: #fff;
}

.alpha-nav button.active {
    background-color: #3498db;
    color: #fff;
}

.alpha-nav button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.alpha-nav button:disabled:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.alpha-nav .nav-separator {
    width: 100%;
    height: 2px;
    background-color: #dee2e6;
    margin: 0;
}

.alpha-nav .page-button {
    width: 100%;
    background-color: #e9ecef;
    font-size: 12px;
    font-weight: 700;
}

.alpha-nav .page-button:hover:not(:disabled) {
    background-color: #2980b9;
}

.alpha-nav .page-button.active {
    background-color: #2c3e50;
    color: #fff;
}

.alpha-nav .page-button:disabled {
    opacity: 0.5;
}

.song-list {
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    flex: 1;
}

.song-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    cursor: pointer;
}

.song-item:hover {
    background-color: #f8f9fa;
}

.song-item:last-child {
    border-bottom: none;
}

.song-info {
    flex: 1;
}

.song-title {
    font-weight: 400;
    color: #3e6489;
    margin-bottom: 4px;
}

.song-artist {
    color: #666;
    font-size: 14px;
}

.song-duration {
    color: #999;
    font-size: 14px;
    margin-left: 20px;
}

.loading {
    padding: 40px;
    text-align: center;
    color: #666;
}

.error {
    padding: 40px;
    text-align: center;
    color: #e74c3c;
}

.no-results {
    padding: 40px;
    text-align: center;
    color: #666;
}

.no-results p {
    margin-bottom: 20px;
}

.suggest-btn {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggest-btn:hover {
    background-color: #2980b9;
}

.suggest-intro {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.section-header {
    background-color: #f8f9fa;
    padding: 15px;
    font-weight: 600;
    color: #1b5ea1;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.2s;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.visible {
    opacity: 1;
}

.scroll-to-top:hover {
    background-color: #2980b9;
}

.scroll-to-top:active {
    transform: translateY(1px);
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .alpha-nav {
        position: static;
        width: 100%;
        gap: 8px;
    }
    
    .page-buttons-container {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        gap: 1px;
    }
    
    .letter-buttons-container {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        margin-top: 4px;
    }
    
    .alpha-nav button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .alpha-nav .page-button {
        flex: 1;
        min-width: 0;
        padding: 8px 4px;
        font-size: 10px;
        height: 35px;
    }
    
    .alpha-nav .nav-separator {
        width: 100%;
        height: 1px;
        margin: 0;
    }
}

@media (max-width: 340px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    #searchInput,
    #sortBy {
        width: 100%;
    }
    
    .song-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .song-duration {
        margin-left: 0;
        margin-top: 5px;
    }
}

/* Dark Theme Styles */
body.dark-theme {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-theme header,
body.dark-theme .song-list,
body.dark-theme .alpha-nav,
body.dark-theme .info-popup-content {
    background-color: #2a2a2a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-theme h1,
body.dark-theme h2 {
    color: #f0f0f0;
}

body.dark-theme .theme-toggle {
    background-color: #2a2a2a;
    border-color: #4a9eff;
}

body.dark-theme .theme-toggle:hover {
    background-color: #3a3a3a;
}

body.dark-theme .info-button {
    background-color: #2a2a2a;
    border-color: #4a9eff;
    color: #4a9eff;
}

body.dark-theme .info-button:hover {
    background-color: #4a9eff;
    color: #fff;
}

body.dark-theme #searchInput,
body.dark-theme #sortBy {
    background-color: #3a3a3a;
    border-color: #4a4a4a;
    color: #e0e0e0;
}

body.dark-theme #searchInput:focus {
    border-color: #4a9eff;
}

body.dark-theme .alpha-nav button {
    background-color: #3a3a3a;
    color: #b0b0b0;
}

body.dark-theme .alpha-nav button:hover {
    background-color: #4a9eff;
    color: #fff;
}

body.dark-theme .alpha-nav button.active {
    background-color: #4a9eff;
    color: #fff;
}

body.dark-theme .alpha-nav button:disabled {
    opacity: 0.3;
}

body.dark-theme .alpha-nav .page-button {
    background-color: #404040;
}

body.dark-theme .alpha-nav .page-button.active {
    background-color: #4a6fa5;
}

body.dark-theme .song-item {
    border-bottom-color: #3a3a3a;
}

body.dark-theme .song-item:hover {
    background-color: #333;
}

body.dark-theme .song-title {
    color: #6db3f2;
}

body.dark-theme .song-artist {
    color: #999;
}

body.dark-theme .song-duration {
    color: #777;
}

body.dark-theme .section-header {
    background-color: #333;
    color: #4a9eff;
    border-bottom-color: #4a4a4a;
}

body.dark-theme .scroll-to-top {
    background-color: #4a9eff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.dark-theme .scroll-to-top:hover {
    background-color: #3a8eef;
}

body.dark-theme .info-popup {
    background-color: rgba(0, 0, 0, 0.8);
}

body.dark-theme .info-popup-close {
    color: #999;
}

body.dark-theme .info-popup-close:hover {
    color: #ddd;
}

body.dark-theme .info-item strong {
    color: #b0b0b0;
}

body.dark-theme .nav-separator {
    background-color: #4a4a4a;
}

body.dark-theme .request-song-info {
    background-color: #333;
}

body.dark-theme .request-title {
    color: #f0f0f0;
}

body.dark-theme .form-group label {
    color: #b0b0b0;
}

body.dark-theme .form-group input {
    background-color: #3a3a3a;
    border-color: #4a4a4a;
    color: #e0e0e0;
}

body.dark-theme .form-group input:focus {
    border-color: #4a9eff;
}

body.dark-theme .submit-btn {
    background-color: #4a9eff;
}

body.dark-theme .submit-btn:hover {
    background-color: #3a8eef;
}

body.dark-theme .request-feedback.success {
    background-color: #1e3a1e;
    color: #90ee90;
    border-color: #2d5a2d;
}

body.dark-theme .request-feedback.error {
    background-color: #3a1e1e;
    color: #ff6b6b;
    border-color: #5a2d2d;
}

body.dark-theme .suggest-btn {
    background-color: #4a9eff;
}

body.dark-theme .suggest-btn:hover {
    background-color: #3a8eef;
}

body.dark-theme .suggest-intro {
    color: #999;
}