/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --fg: hsl(0, 0%, 10%);
    --bg: #ffffff;
    --bg-secondary: hsl(0, 0%, 97%);
    --border: hsl(0, 0%, 90%);
    --border-hover: hsl(0, 0%, 88%);
    --accent: hsl(201, 17%, 50%);
    --link: #1d7484;
    --muted: hsl(0, 0%, 50%);
    --hover-bg: hsl(0, 0%, 95%);
    --error-bg: #fee;
    --error-border: #fcc;
    --error-text: #c33;
    --success-bg: #efe;
    --success-border: #cfc;
    --success-text: #363;
}

[data-theme="dark"] {
    --fg: hsl(0, 0%, 90%);
    --bg: hsl(0, 0%, 10%);
    --bg-secondary: hsl(0, 0%, 13%);
    --border: hsl(0, 0%, 20%);
    --border-hover: hsl(0, 0%, 25%);
    --link: hsl(0, 0%, 80%);
    --muted: hsl(0, 0%, 60%);
    --hover-bg: hsl(0, 0%, 16%);
    --error-bg: hsl(0, 40%, 20%);
    --error-border: hsl(0, 40%, 30%);
    --error-text: hsl(0, 60%, 70%);
    --success-bg: hsl(120, 30%, 20%);
    --success-border: hsl(120, 30%, 30%);
    --success-text: hsl(120, 50%, 70%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--fg);
    background-color: var(--bg);
    font-size: 17px;
    font-weight: 400;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
#app-header {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
    transition: border-color 0.2s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: none;
    margin: 0;
    padding: 0;
}

.logo {
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
}

#main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--link);
    text-decoration: none;
    font-size: 0.95rem;
}

.nav-link:hover {
    text-decoration: underline;
}

.nav-link.active {
    font-weight: 500;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.user-dropdown-toggle i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.user-dropdown.active .user-dropdown-toggle i {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.user-dropdown-menu a:first-child {
    border-radius: 8px 8px 0 0;
}

.user-dropdown-menu a:last-child {
    border-radius: 0 0 8px 8px;
}

.user-dropdown-menu a:hover {
    background: var(--hover);
}

.user-dropdown-menu a i {
    width: 1rem;
    text-align: center;
    opacity: 0.7;
}

.user-dropdown-menu a.logout-link {
    color: var(--danger);
    border-top: 1px solid var(--border);
}

.user-dropdown-menu a.logout-link:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Theme Toggle Switch */
.theme-toggle-wrapper {
    margin-left: 0.5rem;
}

#theme-toggle {
    display: none;
}

.theme-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    width: 60px;
    height: 28px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 50px;
    position: relative;
    transition: background 0.3s ease;
    padding: 4px;
}

.theme-toggle-label:hover {
    opacity: 0.9;
}

.theme-toggle-label .moon,
.theme-toggle-label .sun {
    font-size: 0.75rem;
    z-index: 1;
    transition: opacity 0.3s ease;
    color: var(--text);
    opacity: 0.7;
}

.theme-toggle-label .moon {
    margin-left: 5px;
}

.theme-toggle-label .sun {
    margin-right: 5px;
}

.theme-toggle-label .slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#theme-toggle:checked + .theme-toggle-label {
    background: #2c3e50;
}

#theme-toggle:checked + .theme-toggle-label .slider {
    transform: translateX(32px);
}

/* Search */
.search-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 0.5rem;
    color: var(--muted);
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.search-toggle-btn:hover {
    color: var(--fg);
}

.search-container {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999;
}

.search-container.active {
    max-height: 100px;
    opacity: 1;
}

#search-input {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
}

#search-input:focus {
    outline: none;
    border-color: var(--link);
}

.search-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--muted);
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.search-close-btn:hover {
    color: var(--fg);
}

.search-results-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.search-results-count {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Main Content */
#app-content {
    min-height: calc(100vh - 60px);
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    font-size: 1rem;
    color: var(--muted);
}

/* Map Container - Split Layout */
#map-container {
    display: flex;
    height: calc(100vh - 50px);
}

#map {
    width: 80%;
    height: 100%;
    transition: width 0.3s ease, filter 0.3s ease;
}

#map.feed-collapsed {
    width: 100%;
}

#map.monochrome .leaflet-tile-pane {
    filter: grayscale(100%) contrast(1.1);
}

#recordings-feed {
    width: 30%;
    height: 100%;
    overflow-y: auto;
    border-left: 1px solid var(--border);
    background: var(--bg);
    transition: transform 0.3s ease, width 0.3s ease;
    position: relative;
}

#recordings-feed.collapsed {
    transform: translateX(100%);
    width: 0;
}

#feed-toggle {
    position: fixed;
    right: calc(30% - 2rem);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 1rem 0.4rem;
    cursor: pointer;
    color: var(--muted);
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 1001;
    border-radius: 4px;
    line-height: 1;
}

#feed-toggle:hover {
    color: var(--fg);
    background: var(--hover-bg);
}

#feed-toggle.feed-collapsed {
    right: 0.5rem;
}

#recordings-feed .feed-inner {
    padding: 1.5rem;
    margin: 0 1.5rem;
    max-width: 600px;
}

/* Map Monochrome Toggle */
.leaflet-top.leaflet-left .leaflet-control-monochrome {
    margin-top: 10px;
}

.leaflet-control-monochrome {
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.65);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.leaflet-control-monochrome:hover {
    background: #f4f4f4;
}

.leaflet-control-monochrome.active {
    background: #333;
    color: white;
}

[data-theme="dark"] .leaflet-control-monochrome {
    background: hsl(0, 0%, 14%);
    border-color: rgba(255,255,255,0.2);
    color: hsl(0, 0%, 90%);
}

[data-theme="dark"] .leaflet-control-monochrome:hover {
    background: hsl(0, 0%, 20%);
}

[data-theme="dark"] .leaflet-control-monochrome.active {
    background: hsl(0, 0%, 90%);
    color: hsl(0, 0%, 10%);
}

/* Recording Post */
.recording-post {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.recording-post:last-child {
    border-bottom: none;
}

.recording-post h3 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.recording-post .post-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.recording-post .post-content {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.recording-post .post-content p {
    margin-bottom: 1rem;
}

.recording-post .post-content strong {
    font-weight: 600;
}

.recording-post .post-content em {
    font-style: italic;
}

.recording-post .post-content a {
    color: var(--link);
    text-decoration: underline;
}

.recording-post .post-image {
    width: 100%;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.recording-post .post-audio {
    margin-top: 1rem;
}

.post-date-link {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-date-link:hover {
    color: var(--fg);
    text-decoration: underline;
}

/* Single Recording View */
.recording-single-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.recording-single {
    background: var(--bg);
}

.recording-header {
    margin-bottom: 2rem;
}

.recording-header h1 {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.recording-meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.recording-date {
    font-weight: 500;
}

.recording-author {
    color: var(--muted);
}

.recording-image-container {
    margin-bottom: 2rem;
}

.recording-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.recording-audio-container {
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
}

.recording-content {
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.7;
}

.recording-content p {
    margin-bottom: 1rem;
}

.recording-content strong {
    font-weight: 600;
}

.recording-content em {
    font-style: italic;
}

.recording-content a {
    color: var(--fg);
    text-decoration: underline;
}

.recording-location {
    margin-bottom: 2rem;
}

.recording-location h3 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

div.recording-actions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px);
}

.auth-box {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
}

.auth-box h2 {
    margin-bottom: 2.5rem;
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* Forms */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--border-hover);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.form-error {
    color: var(--error-text);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: none;
    border: 1px solid var(--error-border);
    border-radius: 4px;
    background: var(--error-bg);
    padding: 0.75rem;
}

.form-error.show {
    display: block;
}

.form-success {
    color: var(--success-text);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: none;
    border: 1px solid var(--success-border);
    border-radius: 4px;
    background: var(--success-bg);
    padding: 0.75rem;
}

.form-success.show {
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    padding: 0.65rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--fg);
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn:hover {
    background: var(--hover-bg);
    border-color: var(--border-hover);
}

.btn-primary {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}

.btn-primary:hover {
    background: hsl(0, 0%, 20%);
    border-color: hsl(0, 0%, 20%);
}

.btn-secondary {
    background: var(--bg);
    color: var(--fg);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--hover-bg);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

.btn-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

/* Upload Form */
#view-upload {
    padding: 3rem 0;
}

#upload-map {
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-top: 0.5rem;
    overflow: hidden;
}

/* Admin Panel */
#view-admin {
    padding: 3rem 0;
}

.admin-section {
    margin-top: 4rem;
}

.admin-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    background: var(--bg);
}

.admin-card h4 {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    font-weight: 500;
}

#users-list {
    margin-top: 1rem;
}

.user-item {
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s ease;
}

.user-item:hover {
    background: var(--hover-bg);
}

.user-info {
    flex: 1;
}

.user-info strong {
    display: block;
    margin-bottom: 0.25rem;
}

.user-info small {
    color: var(--muted);
    font-size: 0.85rem;
}

.user-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.5rem;
    background: var(--bg-secondary);
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

/* Popup Styling */
.leaflet-popup-content {
    margin: 1rem;
}

.popup-title {
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.popup-description {
    margin-bottom: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.popup-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.popup-audio {
    margin-top: 1rem;
}

.popup-image {
    width: 100%;
    max-width: 300px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* Audio Player - Modern Design */
.audio-player {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    background: var(--bg-secondary);
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.play-btn {
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.play-btn:hover {
    background: var(--hover-bg);
    border-color: var(--fg);
    transform: scale(1.08);
}

.audio-progress {
    flex: 1;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.audio-progress-bar {
    height: 100%;
    background: var(--muted);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-time {
    font-size: 0.7rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

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

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 500;
}

.stat-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.stat-table th,
.stat-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.stat-table th {
    font-weight: 500;
    color: var(--muted);
    font-size: 0.85rem;
}

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

/* Upload Trend Bar Chart */
.upload-trend-chart {
    margin-top: 1rem;
}

.chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.75rem;
}

.chart-label {
    min-width: 80px;
    font-size: 0.85rem;
    color: var(--muted);
}

.chart-bar-container {
    flex: 1;
    height: 28px;
    background: var(--bg-secondary);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--link));
    border-radius: 4px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
}

.chart-value {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--bg);
    min-width: 20px;
    text-align: right;
}

.chart-bar-fill[style*="width: 0"] .chart-value {
    color: var(--muted);
    padding-left: 0.5rem;
}

/* Filter Banner */
.filter-banner {
    background: var(--accent);
    color: var(--bg);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.btn-clear-filter {
    background: rgba(255, 255, 255, 0.2);
    color: var(--bg);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.btn-clear-filter:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Clickable stats */
.stat-link {
    color: var(--link);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.stat-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.stat-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.stat-table tbody tr:hover {
    background-color: var(--bg-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    #main-nav {
        gap: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .user-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    #map-container {
        flex-direction: column;
        height: auto;
    }

    #map {
        width: 100% !important;
        height: 50vh;
    }

    #recordings-feed {
        width: 100% !important;
        height: auto;
        border-left: none;
        border-top: 1px solid var(--border);
        transform: none !important;
    }

    #feed-toggle {
        display: none;
    }

    /* Recordings Table Mobile - Card Layout */
    .recordings-table,
    .recordings-table thead,
    .recordings-table tbody,
    .recordings-table tr,
    .recordings-table th,
    .recordings-table td {
        display: block;
    }

    .recordings-table {
        border: none;
    }

    .recordings-table thead {
        display: none;
    }

    .recordings-table tbody tr {
        height: auto;
        margin-bottom: 1rem;
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 1rem;
        background: var(--bg);
    }

    .recordings-table tbody tr:hover {
        background: var(--hover-bg);
    }

    .recordings-table td {
        padding: 0.5rem 0;
        border-bottom: none;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .recordings-table td.recording-actions-cell {
        height: auto;
        padding-top: 1rem;
        margin-top: 1rem;
        border-top: 1px solid var(--border);
        justify-content: flex-end;
        display: flex;
    }

    .recordings-table td::before {
        content: attr(data-label);
        font-weight: 500;
        min-width: 80px;
        color: var(--muted);
        font-size: 0.85rem;
    }

    .recordings-table td.recording-actions-cell::before {
        content: none;
    }

    .recording-thumbnail {
        max-width: 80px;
        max-height: 60px;
    }

    .recordings-table .recording-actions .btn {
        min-width: 28px;
        height: 28px;
        padding: 0.4rem;
        font-size: 0.85rem;
    }

    .mini-player {
        min-width: auto;
        flex: 1;
    }
}

/* Recordings Table */
.recordings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.recordings-table thead {
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.recordings-table th,
.recordings-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.recordings-table th {
    font-weight: 500;
    font-size: 0.9rem;
}

.recordings-table tbody tr {
    height: 80px;
}

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

.recordings-table tbody tr:hover {
    background: var(--hover-bg);
}

.recording-thumbnail {
    max-width: 100px;
    max-height: 60px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.recordings-table td.recording-actions-cell {
    white-space: nowrap;
}

.recordings-table td.recording-actions-cell .btn {
    min-width: 30px;
    height: 30px;
    padding: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.recordings-table td.recording-actions-cell .btn:last-child {
    margin-right: 0;
}

.mini-player {
    min-width: 200px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(2px);
}

.modal-content {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    margin-bottom: 2rem;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Settings Section */
.settings-section {
    margin-top: 3rem;
    padding: 3rem 0;
}

.settings-section h3 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.settings-logout {
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

/* Blog View */
.blog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem 0.5rem 1.5rem;
}

.blog-post {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.blog-post:last-child {
    border-bottom: none;
}

.blog-post-title {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: var(--fg);
}

.blog-post-meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.blog-post-date-link {
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-post-date-link:hover {
    color: var(--fg);
    text-decoration: underline;
}

.blog-post-author {
    color: var(--muted);
}

.blog-post-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: block;
    transition: opacity 0.2s ease;
}

.blog-post-image:hover {
    opacity: 0.9;
}

.blog-post-content {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
}

.blog-post-content p {
    margin-bottom: 1rem;
}

.blog-post-content strong {
    font-weight: 600;
}

.blog-post-content em {
    font-style: italic;
}

.blog-post-content a {
    color: var(--link);
    text-decoration: underline;
}

.blog-post-audio {
    margin-bottom: 1.5rem;
    padding: 0;
    background: transparent;
}

.audio-metadata {
    margin-top: 0.75rem;
    padding: 0;
    background: transparent;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
    opacity: 0.75;
}

.blog-post-read-more {
    display: inline-block;
    color: var(--link);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.blog-post-read-more:hover {
    color: var(--fg);
}

.no-recordings {
    text-align: center;
    color: var(--muted);
    padding: 3rem 0;
    font-size: 1.1rem;
}

/* Blog Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 0;
}

.pagination-btn {
    padding: 0.6rem 1.2rem;
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: var(--hover-bg);
    border-color: var(--fg);
}

.pagination-info {
    color: var(--muted);
    font-size: 0.95rem;
}

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

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Address/Location Styling */
.popup-location,
.blog-post-location {
    color: var(--muted);
    font-size: 0.9em;
}

.recording-location h3 {
    color: var(--fg);
}

/* Location Details - Subtle Labels (Option 2) */
.location-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.location-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.location-label {
    font-size: 0.75rem;
    color: var(--muted);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.location-value {
    color: var(--fg);
    font-size: 0.95rem;
    font-style: italic;
}

.location-link {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s ease;
}

.location-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.blog-post-location {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popup-location {
    margin: 0.25rem 0;
    word-break: break-word;
}

/* Blog Footer */
.blog-footer {
    margin: 1rem 0 0 0;
    padding: 0;
    text-align: center;
}

.blog-footer .rss-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--link);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.blog-footer .rss-link:hover {
    opacity: 1;
    text-decoration: none;
}

.blog-footer .rss-link i {
    font-size: 1rem;
}

