
body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Navigation Bar Styles */
nav {
    background-color: #333;               /* Dark background */
    padding: 15px 30px;                   /* Space inside the nav */
    display: flex;                         /* Horizontal layout */
    gap: 20px;                             /* Space between links */
    align-items: center;                   /* Vertical alignment */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Soft shadow for depth */
    position: relative;
    z-index: 100;
}

nav a {
    color: white;                          /* Link color */
    text-decoration: none;                 /* Remove underline */
    font-weight: 500;                       /* Medium weight text */
    padding: 8px 12px;                      /* Padding inside link */
    border-radius: 5px;                     /* Rounded corners */
    transition: background-color 0.2s, color 0.2s; /* Smooth hover effect */
    white-space: nowrap;                    /* Prevent text wrapping */
    flex-shrink: 0;                         /* Prevent links from shrinking */
}

nav a:hover {
    background-color: #ffcc00;             /* Highlight on hover */
    color: #333;                           /* Dark text on hover */
}

nav a.active {
    background-color: #ffcc00;             /* Highlight current page */
    color: #333;
}

.container, main {
    padding: 40px 20px;
}

h1, h2 {
    color: #333;
}

button {
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #555;
}

input[type="file"] {
    margin: 10px 0;
}

.section-placeholder {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.upload-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.upload-form {
    flex: 1;
    min-width: 0;
}

.upload-form input[type="text"],
.upload-form select {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    background-color: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.upload-form input[type="text"]:focus,
.upload-form select:focus {
    outline: none;
    border-color: #1db954;
}

.upload-form input[type="text"]:required:invalid,
.upload-form select:required:invalid {
    border-color: #dc3545;
}

.upload-form input[type="text"]:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.upload-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}

.additional-metadata {
    flex: 0 0 300px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.additional-metadata h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
}

.album-cover-container {
    margin: 15px 0;
    text-align: center;
}

.metadata-stats {
    margin-top: 20px;
}

.metadata-stat {
    margin: 15px 0;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.metadata-stat strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.metadata-stat span {
    font-size: 18px;
    color: #555;
    font-weight: 500;
}

.audio-features-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.audio-features-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.audio-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.audio-feature {
    padding: 8px;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    font-size: 13px;
}

.audio-feature strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
    font-size: 12px;
    font-weight: 500;
}

.audio-feature span {
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

/* Videos Page Styles */
.videos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.video-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: visible;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.video-card-content {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.video-album-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-album-cover,
.video-snapshot {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.video-album-placeholder {
    width: 120px;
    height: 120px;
    background-color: #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    text-align: center;
}

.video-info-section {
    flex: 1;
    min-width: 0;
}

.video-track-name {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.video-artist-name {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 16px;
}

.video-metadata {
    margin-bottom: 15px;
}

.video-meta-item {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.video-meta-item strong {
    color: #333;
    margin-right: 5px;
}

.video-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.play-video-btn {
    padding: 10px 20px;
    background-color: #1db954;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.play-video-btn:hover:not(:disabled) {
    background-color: #1ed760;
}

.play-video-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.delete-video-btn-x {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    padding: 0;
}

.delete-video-btn-x:hover:not(:disabled) {
    background-color: #c82333;
    transform: scale(1.1);
}

.delete-video-btn-x:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.delete-video-btn {
    padding: 10px 20px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.delete-video-btn:hover:not(:disabled) {
    background-color: #c82333;
}

.delete-video-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.edit-metrics-btn {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.edit-metrics-btn:hover:not(:disabled) {
    background-color: #0056b3;
}

.edit-metrics-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Edit Metrics Modal */
.edit-metrics-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.edit-metrics-modal-content {
    background-color: white;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.edit-metrics-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.edit-metrics-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-modal-btn:hover {
    background-color: #f0f0f0;
}

.edit-metrics-form {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #007bff;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.cancel-btn,
.save-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.cancel-btn {
    background-color: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background-color: #5a6268;
}

.save-btn {
    background-color: #28a745;
    color: white;
}

.save-btn:hover {
    background-color: #218838;
}

.social-metrics-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.social-metrics-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.suggest-hashtags-btn {
    padding: 10px 20px;
    background-color: #6f42c1;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.suggest-hashtags-btn:hover:not(:disabled) {
    background-color: #5a32a3;
}

.suggest-hashtags-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Hashtag Suggestions Modal */
.hashtag-suggestions-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.hashtag-suggestions-modal-content {
    background-color: white;
    border-radius: 8px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hashtag-suggestions-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
}

.hashtag-suggestions-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

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

.hashtag-suggestions-content {
    padding: 20px;
}

.hashtag-platform-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.hashtag-platform-section:last-of-type {
    border-bottom: none;
}

.hashtag-platform-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.hashtag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    min-height: 50px;
}

.hashtag-tag {
    display: inline-block;
    padding: 8px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.hashtag-tag:hover {
    background-color: #e0e0e0;
    border-color: #999;
    transform: translateY(-2px);
}

.hashtag-tag.hashtag-top {
    background-color: #6f42c1;
    color: white;
    border-color: #5a32a3;
    font-weight: 600;
}

.hashtag-tag.hashtag-top:hover {
    background-color: #5a32a3;
}

.hashtag-tag.hashtag-copied {
    background-color: #28a745;
    color: white;
    border-color: #218838;
}

.hashtag-buttons-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.copy-hashtags-btn {
    padding: 10px 20px;
    background-color: #6f42c1;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    flex: 1;
    min-width: 150px;
}

.copy-hashtags-btn:hover {
    background-color: #5a32a3;
}

.copy-recommended-btn {
    background-color: #28a745;
}

.copy-recommended-btn:hover {
    background-color: #218838;
}

.copy-all-btn {
    background-color: #6f42c1;
}

.copy-all-btn:hover {
    background-color: #5a32a3;
}

.hashtag-suggestions-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.hashtag-note {
    font-size: 12px;
    color: #666;
    margin: 0;
    font-style: italic;
}

.hashtag-suggestions-error {
    padding: 40px 20px;
    text-align: center;
    color: #dc3545;
}

.retry-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.retry-btn:hover {
    background-color: #0056b3;
}

/* Pre Recording Page Styles */
.search-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.search-section h2 {
    margin-top: 0;
    color: #333;
    font-size: 22px;
}

.search-field {
    margin-bottom: 20px;
}

.search-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.search-field input[type="text"] {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.search-field input[type="text"]:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.search-results {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
    max-width: 400px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
}

.search-results:not(:empty) {
    display: block;
}

.search-results li {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.search-results li:hover {
    background-color: #f5f5f5;
}

.search-results li:last-child {
    border-bottom: none;
}

.add-button, .clear-button {
    padding: 12px 24px;
    background-color: #1db954;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.add-button:hover:not(:disabled) {
    background-color: #1ed760;
}

.add-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.clear-button {
    background-color: #dc3545;
    margin-top: 20px;
}

.clear-button:hover {
    background-color: #c82333;
}

.comparison-section {
    margin-top: 30px;
}

.comparison-section h2 {
    margin-top: 0;
    color: #333;
    font-size: 22px;
}

.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.comparison-table thead {
    background-color: #333;
    color: white;
}

.comparison-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #555;
}

.comparison-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: #555;
}

.comparison-table tbody tr:hover {
    background-color: #f9f9f9;
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.remove-button {
    padding: 6px 12px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.remove-button:hover {
    background-color: #c82333;
}

@media (max-width: 768px) {
    /* Mobile Navigation - Horizontal Scrollable */
    nav {
        padding: 12px 15px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        scrollbar-width: thin; /* Firefox */
        scrollbar-color: #666 #333; /* Firefox */
        touch-action: pan-x; /* Allow horizontal panning only */
    }
    
    /* Hide scrollbar on mobile but keep functionality */
    nav::-webkit-scrollbar {
        height: 4px;
    }
    
    nav::-webkit-scrollbar-track {
        background: #333;
    }
    
    nav::-webkit-scrollbar-thumb {
        background: #666;
        border-radius: 2px;
    }
    
    nav::-webkit-scrollbar-thumb:hover {
        background: #888;
    }
    
    nav a {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .upload-container {
        flex-direction: column;
    }
    
    .additional-metadata {
        flex: 1;
        width: 100%;
    }
    
    .audio-features-grid {
        grid-template-columns: 1fr;
    }
    
    .videos-container {
        grid-template-columns: 1fr;
    }
    
    .video-card-content {
        flex-direction: column;
    }
    
    .video-album-cover,
    .video-snapshot,
    .video-album-placeholder {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .video-album-section {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .table-container {
        overflow-x: scroll;
    }
    
    .comparison-table {
        min-width: 800px;
    }
    
    .search-field input[type="text"] {
        max-width: 100%;
    }
    
    .search-results {
        max-width: 100%;
    }
}

/* Artist Analysis Section */
.artist-analysis-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.artist-analysis-section h2 {
    margin-top: 0;
    color: #333;
    font-size: 22px;
}

.artist-analysis-search {
    margin-bottom: 30px;
}

.artist-analysis-search label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.artist-analysis-search input[type="text"] {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* Genre Analysis Section */
.genre-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.genre-section h2 {
    margin-top: 0;
    color: #333;
    font-size: 22px;
}

.genre-search-field {
    margin-bottom: 30px;
}

.genre-search-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.genre-search-field input[type="text"] {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
}

.search-genre-button {
    padding: 10px 20px;
    background-color: #1db954;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    display: inline-block;
    vertical-align: middle;
}

.search-genre-button:hover {
    background-color: #1ed760;
}

.genre-table-section {
    margin-bottom: 40px;
}

.genre-table-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.clickable-artist {
    color: #1db954;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, text-decoration 0.2s;
}

.clickable-artist:hover {
    color: #1ed760;
    text-decoration: underline;
}

.clickable-track {
    color: #1db954;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, text-decoration 0.2s;
}

.clickable-track:hover {
    color: #1ed760;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .genre-search-field input[type="text"] {
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
        display: block;
    }
    
    .search-genre-button {
        display: block;
        width: 100%;
        max-width: 400px;
    }
}