/* OPE! Music Discovery Website - Ultra Minimal Styling */
/* Clean, plain-text aesthetic with subtle animations */

/* Basic Reset - removes default browser styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1001;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: monospace;
    line-height: 1.3;
    color: #000;
    background-color: #fff;
    font-size: 14px;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Basic Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
    margin: 15px 0 8px 0;
}

h1 {
    font-size: 16px;
    display: inline-block;
    margin-right: 15px;
}

.header-title {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-title:hover {
    color: #333;
}

.header-title:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

h2 {
    font-size: 14px;
    font-weight: bold;
}

h3 {
    font-size: 14px;
}

p {
    margin: 8px 0;
}

/* Basic Links */
a {
    color: #000;
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}

a:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    text-decoration: none;
}

/* Basic Lists */
ul, ol {
    margin: 8px 0;
    padding-left: 20px;
}

li {
    margin: 3px 0;
}

/* Header Layout - positions logo and text side by side */
/* Uses inline-block for horizontal alignment without flexbox complexity */
.header-content {
    margin-bottom: 20px;
}

/* Add space between tagline and logo */
.header-text p:last-child {
    margin-bottom: 25px;
}

.header-text {
    display: inline-block;
    vertical-align: top;
}

.header-image {
    display: inline-block;
    vertical-align: bottom;
    margin-left: 15px;
}

/* Logo Animation - subtle bounce effect for visual interest */
/* Gentle upward movement every 2 seconds */
.logo {
    width: 130px;
    height: 130px;
    animation: gentle-bounce 2s ease-in-out infinite;
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Author Image - small profile picture in footer */
/* Subtle glow effect on hover for interactivity */
.author-image {
    width: 40px;
    height: 40px;
    margin: 10px 0 20px 0;
    animation: subtle-glow 4s ease-in-out infinite;
    display: block;
}

@keyframes subtle-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Basic Spacing */
.section {
    margin: 25px 0;
}

.search-section {
    margin: 1px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.share-section {
    margin: 20px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    text-align: center;
}

.share-section .share-btn {
    font-size: 16px;
    padding: 12px 24px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-section .share-btn:hover {
    background-color: #333;
    transform: translateY(-1px);
}

.share-section .share-btn:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Mobile search section optimization */
@media (max-width: 768px) {
    .search-section {
        padding: 10px;
        margin: 5px 0;
    }
    
    .search-section input {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    /* Mobile share options optimization */
    .share-options {
        min-width: 160px;
        font-size: 12px;
    }
    
    .share-option {
        padding: 10px 12px; /* Larger touch targets on mobile */
    }
}

.search-section input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.search-section input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.search-help {
    margin: 8px 0 0 0;
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.keyboard-help {
    font-size: 11px;
    color: #555;
    margin: 8px 0;
    padding: 8px;
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
    border-radius: 4px;
}

.keyboard-help kbd {
    background-color: #e9ecef;
    border: 1px solid #adb5bd;
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
    color: #495057;
    display: inline-block;
    font-size: 10px;
    font-family: monospace;
    line-height: 1.4;
    margin: 0 2px;
    padding: 2px 4px;
    white-space: nowrap;
}

.no-results {
    margin: 15px 0 0 0;
    font-size: 14px;
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
}

/* Song and Album Entry Styling - consistent layout for all content */
/* Each entry has title, rating, date, description, and action links */
.song-entry, .link-entry {
    margin: 15px 0;
    padding: 8px 0;
}

.song-title {
    font-weight: bold;
    margin: 0 0 0.5rem 0;
}

.song-links {
    margin: 0.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.song-links a, .song-links .share-btn {
    color: #0066cc;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s ease;
}

.song-links .share-btn:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    border-radius: 3px;
}

.song-links a:hover, .song-links .share-btn:hover {
    color: #004499;
}

.song-links a:active, .song-links .share-btn:active {
    color: #003366;
}

/* Share button success state - visual feedback when link is copied */
/* Green background with darker text for clear confirmation */
.share-btn.copied {
    background: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Share options dropdown styling */
.share-options {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 180px;
    font-size: 13px;
}

.share-option {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.share-option:last-child {
    border-bottom: none;
}

.share-option:hover {
    background-color: #f8f9fa;
}

.share-option:active {
    background-color: #e9ecef;
}

/* Existing song entry styles */
.song-date, .song-description {
    margin: 0.5rem 0;
}

.song-artist {
    font-style: italic;
}

.song-date {
    color: #666;
    font-size: 11px;
}

.song-rating {
    margin: 8px 0;
    display: flex;
    align-items: center;
}

.star-box {
    position: relative;
    display: inline-block;
    font-size: 2.2em;
    line-height: 1;
}

.stars-empty {
    color: #ddd;
    position: relative;
    z-index: 1;
}

.stars-filled {
    position: absolute;
    top: 0;
    left: 0;
    color: #ffd700; /* Golden yellow */
    text-shadow: 0 0 3px rgba(255, 215, 0, 0.5);
    overflow: hidden;
    white-space: nowrap;
    z-index: 2;
    transition: all 0.3s ease;
}

.star-box:hover .stars-filled {
    color: #ffed4e;
    text-shadow: 0 0 5px rgba(255, 237, 78, 0.7);
    transform: scale(1.05);
}

.song-description {
    margin: 8px 0;
}

.song-links {
    margin: 8px 0;
}

.song-links a {
    margin-right: 12px;
}

/* Navigation - tab system for switching between content sections */
/* Active tab is highlighted, inactive tabs are subtle */
.nav {
    margin: 15px 0 0 0;
    padding: 8px 0;
    border-bottom: 1px solid #ccc;
}

.nav a {
    margin-right: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav a.active {
    font-weight: bold;
    text-decoration: none;
}

.nav a:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    background-color: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Content Container */
#content-container {
    flex: 1;
}

/* Footer */
.footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #ccc;
    font-size: 11px;
    color: #666;
}

.footer-content {
    margin: 20px 0;
}

.footer-content .last-updated {
    margin: 15px 0;
    font-size: 11px;
    color: #666;
}

.footer-content .support-info {
    margin: 15px 0;
    font-size: 11px;
    color: #666;
}

.footer-content .about-section {
    margin: 20px 0;
}

.footer-content .about-section h3 {
    font-size: 12px;
    font-weight: bold;
    margin: 15px 0 8px 0;
}

.footer-content .about-section p {
    margin: 8px 0;
    font-size: 11px;
    line-height: 1.4;
}

.analytics-info {
    margin: 15px 0;
    font-size: 11px;
    color: #666;
}

.analytics-link {
    color: #0066cc;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.analytics-link:hover {
    color: #004499;
}

.api-info {
    margin: 15px 0;
    font-size: 11px;
    color: #666;
}

.api-link {
    color: #0066cc;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.api-link:hover {
    color: #004499;
}

.footer-bottom {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.footer-bottom .author-image {
    width: 40px;
    height: 40px;
    margin: 0;
    animation: subtle-glow 4s ease-in-out infinite;
}

.footer-bottom .copyright {
    font-size: 11px;
    color: #666;
    align-self: flex-end;
}

/* Last Updated */
.last-updated {
    margin: 15px 0;
    font-size: 11px;
    color: #666;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.back-to-top-btn:active {
    transform: translateY(0);
}

.back-to-top-btn:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Mobile-specific styles for Newsletter and Podcast links */
@media (max-width: 768px) {
    .section p a {
        word-break: break-all;
        overflow-wrap: break-word;
        max-width: 100%;
        display: inline-block;
    }
    
    /* Hide search help text on mobile to show more content */
    .search-help {
        display: none;
    }
    
    /* Mobile header layout adjustments */
    .header-content {
        text-align: center;
    }
    
    .header-text {
        display: block;
        margin-bottom: 15px;
    }
    
    .header-image {
        display: block;
        margin-left: 0;
        text-align: center;
    }
    
    /* Adjust logo size on mobile for better proportion */
    .logo {
        width: 100px;
        height: 100px;
    }
    
    /* Adjust header text sizes for mobile */
    .header-text h1 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .header-text p {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    /* Mobile back to top button adjustments */
    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Data Quality Dashboard Styles */
.data-quality-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid #e9ecef;
}

.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #6c757d;
    font-weight: 600;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    margin: 0;
    color: #007bff;
}

.stat-number.valid {
    color: #28a745;
}

.download-section {
    margin: 30px 0;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.download-section h3 {
    margin: 0 0 20px 0;
    color: #495057;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.download-option {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    text-align: center;
}

.download-option h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 18px;
}

.download-option p {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

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

.download-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.download-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.download-btn.coming-soon {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}

.download-btn.coming-soon:hover {
    background: #6c757d;
    transform: none;
}

.data-issues-section {
    margin: 25px 0;
    padding: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
}

.data-issues-section h3 {
    margin: 0 0 15px 0;
    color: #856404;
}

.issues-list {
    margin-top: 15px;
}

.issue-item {
    padding: 8px 0;
    border-bottom: 1px solid #ffeaa7;
    font-size: 14px;
}

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

/* Modal Styles */
.modal-overlay {
    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: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #495057;
    font-size: 24px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.modal-close:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.modal-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* Billboard Hot 100 Styling */
.billboard-chart {
    margin: 20px 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.chart-entry {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.chart-entry:last-child {
    border-bottom: none;
}

.chart-entry:hover {
    background-color: #f8f9fa;
}

.rank-number {
    font-size: 18px;
    font-weight: bold;
    color: #495057;
    min-width: 40px;
    text-align: center;
    margin-right: 15px;
}

.song-info {
    flex: 1;
    margin-right: 15px;
}

.song-info .song-title {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 4px 0;
    color: #000;
}

.song-info .song-artist {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

.chart-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 11px;
    color: #6c757d;
}

.weeks-on-chart {
    margin-bottom: 2px;
}

.peak-position {
    font-style: italic;
}

.chart-description {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #007bff;
}

.data-source-info {
    background-color: #e8f5e8;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #28a745;
}

.data-source-info h3 {
    margin-top: 0;
    color: #155724;
}

.data-source-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.data-source-info li {
    margin: 5px 0;
}

.analytics-note {
    background-color: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #ffc107;
}

.analytics-note h3 {
    margin-top: 0;
    color: #856404;
}

.analytics-note ul {
    margin: 10px 0;
    padding-left: 20px;
}

.analytics-note li {
    margin: 5px 0;
}

/* Loading spinner for Billboard data */
.loading-spinner {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #6c757d;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px dashed #dee2e6;
}

/* Billboard Watch Styling */
.billboard-chart {
    margin: 20px 0;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

.top-artists-summary {
    margin: 20px 0;
    padding: 20px;
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 12px;
    color: #0c5460;
}

.top-artists-summary h3 {
    margin: 0 0 20px 0;
    font-size: 1.5em;
    text-align: center;
    color: #0c5460;
}

.top-artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.top-artist-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-artist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.artist-rank {
    font-size: 1.8em;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 8px;
}

.artist-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 8px;
}

.artist-score {
    font-size: 1.1em;
    color: #ffd700;
    margin-bottom: 5px;
}

.artist-songs {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.artist-positions {
    font-size: 0.8em;
    opacity: 0.8;
    font-family: monospace;
}

.chart-entry {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.chart-entry:hover {
    background-color: #f8f9fa;
}

.chart-entry:last-child {
    border-bottom: none;
}

.rank-number {
    font-size: 1.2em;
    font-weight: bold;
    color: #666;
    min-width: 40px;
    text-align: center;
}

.song-info {
    flex: 1;
    margin-left: 16px;
}

.song-title {
    margin: 0 0 4px 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.song-artist {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

.chart-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.8em;
    color: #888;
    min-width: 80px;
}

.weeks-on-chart,
.peak-position,
.chart-date {
    margin: 2px 0;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #666;
}

.data-source-info {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}

.data-source-info h3 {
    margin: 0 0 12px 0;
    color: #0c5460;
}

.data-source-info p {
    margin: 0 0 8px 0;
    color: #0c5460;
}

.analytics-note {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.analytics-note h3 {
    margin: 0 0 16px 0;
    color: #495057;
}

.analytics-note ul {
    margin: 0;
    padding-left: 20px;
}

.analytics-note li {
    margin: 8px 0;
    color: #6c757d;
}

.top-artists-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-artists-list li {
    padding: 8px 0;
    margin: 4px 0;
    font-size: 1em;
    color: #0c5460;
    list-style: none;
    margin-left: 0;
}

.top-artists-list li strong {
    color: #0c5460;
}

.scoring-note {
    margin: 20px 0 0 0;
    font-size: 0.85em;
    color: #0c5460;
    opacity: 0.8;
    font-style: italic;
    text-align: left;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .top-artists-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-entry {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    
    .rank-number {
        margin-bottom: 8px;
    }
    
    .song-info {
        margin-left: 0;
        margin-bottom: 8px;
        width: 100%;
    }
    
    .chart-stats {
        align-items: flex-start;
        width: 100%;
    }
    
    .top-artists-list li {
        padding: 6px 0;
        font-size: 0.9em;
        margin-left: 0;
    }
}
