.ai-song-generator-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ai-song-generator-container h3 {
    margin-top: 0;
    color: #2c3e50;
    text-align: center;
    font-size: 26px;
    margin-bottom: 25px;
}

.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

#song-search-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

#song-search-input:focus {
    outline: none;
    border-color: #3498db;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    width: 100%;
    margin-top: 15px;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-success {
    background: #2ecc71;
    color: white;
    width: 100%;
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

/* Search Results */
.search-results {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.search-results h4 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 18px;
    margin-bottom: 15px;
}

#results-list {
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    cursor: pointer;
    transition: all 0.2s;
}

.result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left-color: #2980b9;
}

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

.result-artist {
    color: #7f8c8d;
    font-size: 14px;
}

.result-album {
    color: #95a5a6;
    font-size: 13px;
    margin-top: 3px;
}

/* Lyrics Display */
.lyrics-display {
    margin-bottom: 25px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

.lyrics-header {
    margin-bottom: 20px;
}

.lyrics-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
}

/* Tabs */
.content-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #7f8c8d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #2c3e50;
    background: rgba(52, 152, 219, 0.1);
    transform: none;
    box-shadow: none;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Lyrics Tab */
.lyrics-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #9b59b6;
    line-height: 1.8;
    color: #2c3e50;
    font-size: 15px;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: 'Georgia', serif;
    margin-bottom: 15px;
}

.lyrics-attribution {
    margin-bottom: 10px;
    text-align: right;
    opacity: 0.7;
}

.lyrics-attribution a {
    color: #3498db;
    text-decoration: none;
}

.lyrics-attribution a:hover {
    text-decoration: underline;
}

/* YouTube Tab */
.youtube-videos {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.youtube-player {
    margin-bottom: 20px;
}

.youtube-player iframe {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-info {
    margin-top: 12px;
}

.video-info h5 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 16px;
}

.channel-name {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

.youtube-thumbnail {
    position: relative;
    margin-bottom: 15px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.youtube-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.youtube-thumbnail img {
    width: 100%;
    display: block;
}

.thumbnail-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s;
}

.youtube-thumbnail:hover .thumbnail-overlay {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.thumbnail-info {
    padding: 10px;
    background: white;
}

.thumbnail-title {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thumbnail-channel {
    margin: 0;
    color: #7f8c8d;
    font-size: 12px;
}

.loading-inline {
    text-align: center;
    padding: 40px 20px;
}

.spinner-small {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

.no-results,
.error-inline {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.error-inline {
    color: #e74c3c;
}

/* Audio Tab */
#audio-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
}

.info-text {
    color: #7f8c8d;
    margin-bottom: 15px;
    text-align: center;
}

#audio-output {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

#audio-player {
    width: 100%;
    margin-bottom: 10px;
}

.audio-note {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
    text-align: center;
}

/* Loading */
.loading {
    text-align: center;
    padding: 30px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #7f8c8d;
    font-size: 16px;
}

/* Error Message */
.error-message {
    padding: 15px;
    background: #ffe6e6;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    color: #c0392b;
    margin-top: 15px;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Scrollbar Styling */
.lyrics-content::-webkit-scrollbar,
#results-list::-webkit-scrollbar {
    width: 8px;
}

.lyrics-content::-webkit-scrollbar-track,
#results-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.lyrics-content::-webkit-scrollbar-thumb,
#results-list::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 10px;
}

.lyrics-content::-webkit-scrollbar-thumb:hover,
#results-list::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-song-generator-container {
        padding: 20px;
        margin: 15px;
    }
    
    .search-section {
        flex-direction: column;
    }
    
    #search-song-btn {
        width: 100%;
    }
    
    .content-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .youtube-player iframe {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .ai-song-generator-container h3 {
        font-size: 20px;
    }
    
    .lyrics-content {
        padding: 15px;
        font-size: 14px;
    }
    
    .tab-btn {
        font-size: 12px;
        padding: 8px 10px;
    }
}