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

/* CSS Variables for theming */
:root {
    /* Light mode colors (default) */
    --bg-gradient-start: #1bff41b6;
    --bg-gradient-end: #764ba2;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --text-on-bg: white;
    --card-bg: white;
    --card-shadow: rgba(0, 0, 0, 0.15);
    --card-shadow-hover: rgba(0, 0, 0, 0.2);
    --input-border: #e0e0e0;
    --input-focus: #667eea;
    --input-bg: white;
    --message-bg: #f9f9f9;
    --waveform-bg: #f9f9f9;
    --audio-bg: #f9f9f9;
    --filter-bg: #f5f5f5;
    --table-bg: #f8f9fa;
    --table-hover: #f8f9fa;
    --banned-row-bg: #fff3f3;
    --banned-row-hover: #ffe8e8;
    --border-color: #f0f0f0;
    --button-gradient-start: #667eea;
    --button-gradient-end: #764ba2;
    --accent-color: #667eea;
}

/* Dark mode colors */
body.dark-mode {
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #16213e;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-light: #808080;
    --text-on-bg: #f0f0f0;
    --card-bg: #2a2a3e;
    --card-shadow: rgba(0, 0, 0, 0.5);
    --card-shadow-hover: rgba(0, 0, 0, 0.7);
    --input-border: #444;
    --input-focus: #667eea;
    --input-bg: #1e1e2e;
    --message-bg: #1e1e2e;
    --waveform-bg: #1e1e2e;
    --audio-bg: #1e1e2e;
    --filter-bg: #1e1e2e;
    --table-bg: #1e1e2e;
    --table-hover: #252535;
    --banned-row-bg: #3a1f1f;
    --banned-row-hover: #4a2525;
    --border-color: #3a3a4e;
    --button-gradient-start: #667eea;
    --button-gradient-end: #764ba2;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    padding: 20px;
    transition: background 0.3s ease;
}

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

header {
    text-align: center;
    color: var(--text-on-bg);
    margin-bottom: 40px;
    animation: slideDown 0.6s ease-out;
    position: relative;
    padding-top: 60px; /* Add space for the buttons */
}

.header-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-on-bg);
    padding: 10px 20px;
    border: 2px solid var(--text-on-bg);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 1.2em;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-on-bg);
    padding: 10px 20px;
    border: 2px solid var(--text-on-bg);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

.logout-btn {
    background: #ff6b6b;
    color: white;
    padding: 10px 20px;
    border: 2px solid #ff6b6b;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #ff5252;
    border-color: #ff5252;
}

.welcome-message {
    color: var(--text-on-bg);
    font-weight: 600;
    margin-right: 10px;
    font-size: 1em;
}

.hidden {
    display: none !important;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.admin-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-on-bg);
    padding: 10px 20px;
    border: 2px solid var(--text-on-bg);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

.admin-btn.logged-in {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

.admin-btn.logged-in:hover {
    background: #ff5252;
}

.toggle-form-btn {
    background: linear-gradient(135deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 30px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toggle-form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.toggle-form-btn:active {
    transform: translateY(0);
}

.form-section {
    background: var(--card-bg);
    padding: 30px;
    box-shadow: 0 10px 30px var(--card-shadow);
    margin-bottom: 40px;
    animation: slideUp 0.6s ease-out;
    max-height: 1000px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.form-section.hidden {
    max-height: 0;
    padding: 0 30px;
    margin-bottom: 20px;
    opacity: 0;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

input[type="text"],
input[type="url"],
input[type="file"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="file"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
}

.char-counter {
    font-size: 0.85em;
    color: var(--text-light);
    text-align: right;
    margin-top: 5px;
}

.submit-btn {
    background: linear-gradient(135deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    color: white;
    padding: 14px 40px;
    border: none;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.wall-section {
    color: var(--text-on-bg);
}

.wall-section h2 {
    font-size: 2em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.music-wall {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.music-post {
    background: var(--card-bg);
    padding: 20px;
    box-shadow: 0 5px 20px var(--card-shadow);
    animation: slideIn 0.4s ease-out;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.music-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--card-shadow-hover);
}

/* New Post Header Layout */
.post-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.header-left {
    flex-shrink: 0;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.header-info {
    flex: 1;
}

.username {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1em;
    margin-bottom: 5px;
}

.timestamp {
    font-size: 0.85em;
    color: var(--text-light);
}

.track-title {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--accent-color);
    margin: 5px 0;
}

.track-title.no-title {
    color: var(--text-light);
    font-style: italic;
    font-weight: 400;
}

.delete-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s ease;
}

.delete-btn:hover {
    background: #ff5252;
}

.delete-btn.hidden {
    display: none;
}

.post-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: flex-start;
}

.edit-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s ease;
}

.edit-btn:hover {
    background: #218838;
}

.embed-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s ease;
    border-radius: 4px;
}

.embed-btn:hover {
    background: #5568d3;
}

/* Auth Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.auth-modal-content {
    background: var(--card-bg);
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.auth-modal h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form input {
    padding: 12px;
    border: 2px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-form button {
    background: linear-gradient(135deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    color: white;
    padding: 14px;
    border: none;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.auth-form button:hover {
    transform: translateY(-2px);
}

.auth-modal .close-btn {
    background: #ccc;
    color: #333;
    margin-top: 10px;
    padding: 10px;
    border: none;
    width: 100%;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.auth-modal .close-btn:hover {
    background: #999;
}

.auth-error {
    color: #ff6b6b;
    font-size: 0.9em;
    margin-top: 5px;
    text-align: center;
}

.song-info {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.song-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.artist {
    color: var(--text-secondary);
    font-size: 1em;
    margin-bottom: 10px;
}

/* Rating Section - Inline in Header */
.rating-section-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.rating-section-inline .rating-stars {
    display: flex;
    gap: 3px;
}

.rating-section-inline .star {
    font-size: 1.2em;
    color: var(--input-border);
    transition: color 0.15s ease, transform 0.15s ease;
    user-select: none;
}

.rating-section-inline .star.filled {
    color: #ffc107;
}

.rating-section-inline .star.clickable {
    cursor: pointer;
}

.rating-section-inline .star.clickable:hover,
.rating-section-inline .star.hover {
    color: #ffc107;
    transform: scale(1.2);
}

.rating-section-inline .rating-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
}

.rating-section-inline .average-rating {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1em;
}

.rating-section-inline .rating-count {
    color: var(--text-light);
}

/* Waveform - Main Focal Point */
.waveform-container {
    margin-bottom: 15px;
    background: var(--waveform-bg);
    padding: 20px;
    border: 3px solid var(--accent-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.waveform {
    width: 100%;
    margin-bottom: 15px;
    min-height: 80px;
}

.waveform-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.play-btn {
    background: linear-gradient(135deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.play-btn:active {
    transform: scale(0.95);
}

.time-display {
    font-size: 0.9em;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.volume-icon {
    font-size: 1.2em;
    user-select: none;
}

.volume-slider {
    width: 80px;
    height: 6px;
    background: var(--input-border);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-track {
    height: 6px;
    background: var(--input-border);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.message {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--message-bg);
    border-left: 4px solid #667eea;
}

.music-link {
    display: inline-block;
    background: linear-gradient(135deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-weight: 600;
}

.music-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.empty-message {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
    padding: 40px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2em;
    }

    .form-section {
        padding: 20px;
    }

    .post-header {
        flex-direction: column;
    }

    .delete-btn {
        margin-top: 10px;
    }
}

/* Account Management Styles */
.account-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.account-card {
    background: var(--card-bg);
    padding: 30px;
    box-shadow: 0 5px 20px var(--card-shadow);
    animation: slideUp 0.4s ease-out;
}

.account-card h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.profile-picture-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.profile-picture-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--message-bg);
}

.profile-picture-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-picture-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    color: white;
    font-weight: 600;
    text-align: center;
}

.danger-zone {
    border: 2px solid #ff6b6b;
}

.danger-zone h2 {
    border-bottom-color: #ff6b6b;
    color: #ff6b6b;
}

.warning-text {
    color: #ff6b6b;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 107, 107, 0.1);
    border-left: 4px solid #ff6b6b;
}

.danger-btn {
    background: #ff6b6b;
    color: white;
    padding: 12px 24px;
    border: none;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.danger-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.delete-confirm-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #ff6b6b;
}

.confirm-text {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 600;
}

.danger-btn-confirm {
    background: #ff6b6b;
    color: white;
    padding: 12px 24px;
    border: none;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-bottom: 10px;
}

.danger-btn-confirm:hover {
    background: #ff5252;
}

.cancel-btn {
    background: #ccc;
    color: #333;
    padding: 12px 24px;
    border: none;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.cancel-btn:hover {
    background: #999;
}

.password-reset-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-on-bg);
}

.password-reset-link a {
    color: var(--text-on-bg);
    text-decoration: underline;
    font-weight: 600;
}

.password-reset-link a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Profile Picture in Posts - Header Left */
.header-left .user-profile-picture {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
}

.header-left .user-profile-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.5em;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2em;
    }

    header {
        padding-top: 80px; /* More space on mobile for wrapped buttons */
    }

    .form-section {
        padding: 20px;
    }

    .post-header {
        flex-direction: column;
        gap: 12px;
    }

    .header-right {
        flex-direction: column;
        width: 100%;
    }

    .post-actions {
        align-self: flex-start;
    }

    .delete-btn {
        margin-top: 0;
    }
    
    .account-card {
        padding: 20px;
    }
    
    .profile-picture-preview {
        width: 120px;
        height: 120px;
    }
    
    .header-actions {
        max-width: 100%;
    }

    .waveform-container {
        padding: 15px;
    }
}

/* Cookie Consent Popup */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 2000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    animation: slideUpCookie 0.4s ease-out;
    flex-wrap: wrap;
}

.cookie-consent.hidden {
    display: none;
}

.cookie-consent-content {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

.cookie-consent-message {
    flex: 1;
    min-width: 300px;
    font-size: 1em;
    line-height: 1.5;
}

.cookie-consent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 24px;
    border: none;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-accept-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cookie-accept-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.cookie-reject-btn {
    background: #ff6b6b;
    color: white;
}

.cookie-reject-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

@keyframes slideUpCookie {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .cookie-consent {
        padding: 15px;
    }
    
    .cookie-consent-message {
        font-size: 0.9em;
        min-width: 100%;
        text-align: center;
    }
    
    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }
}

/* Admin Panel Styles */
.admin-login-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--card-shadow);
    max-width: 400px;
    margin: 40px auto;
}

.admin-section {
    animation: fadeIn 0.5s ease-in;
}

.stats-section {
    margin-bottom: 30px;
}

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

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--card-shadow);
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.users-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--card-shadow);
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--filter-bg);
    border-radius: 8px;
}

.filter-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.users-table {
    overflow-x: auto;
}

.users-table table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--input-border);
}

.users-table th {
    background: var(--table-bg);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.users-table tbody tr {
    transition: background-color 0.2s ease;
}

.users-table tbody tr:hover {
    background-color: var(--table-hover);
}

.banned-row {
    background-color: var(--banned-row-bg) !important;
}

.banned-row:hover {
    background-color: var(--banned-row-hover) !important;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-banned {
    background: #f8d7da;
    color: #721c24;
}

.action-btn {
    padding: 6px 12px;
    margin: 2px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

.ban-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

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

.unban-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.view-posts-btn {
    background: #007bff;
    color: white;
}

.view-posts-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.change-password-btn {
    background: #ffc107;
    color: #000;
}

.change-password-btn:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.empty-message {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive admin styles */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .users-table {
        font-size: 0.85em;
    }
    
    .users-table th,
    .users-table td {
        padding: 8px 4px;
    }
    
    .action-btn {
        padding: 4px 8px;
        font-size: 0.75em;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Footer styles */
.footer {
    text-align: center;
    color: white;
}

/* Comments Section Styles */
.comments-section {
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.comments-toggle-btn {
    background: transparent;
    border: 2px solid var(--input-border);
    color: var(--text-secondary);
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-toggle-btn:hover {
    background: var(--filter-bg);
    border-color: var(--input-focus);
    color: var(--text-primary);
}

.comments-toggle-btn.expanded {
    background: var(--filter-bg);
    border-color: var(--input-focus);
}

.comments-toggle-btn::after {
    content: '▼';
    margin-left: auto;
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

.comments-toggle-btn.expanded::after {
    transform: rotate(180deg);
}

.comments-count {
    font-weight: 400;
    opacity: 0.8;
}

.comments-container {
    margin-top: 15px;
    max-height: 400px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.comments-container.hidden {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    pointer-events: none;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 5px;
}

.no-comments {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 20px;
}

.comment {
    background: var(--filter-bg);
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid #667eea;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-profile-picture {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.comment-profile-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.7em;
}

.comment-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9em;
}

.comment-timestamp {
    font-size: 0.75em;
    color: var(--text-light);
}

.comment-delete-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.2em;
    padding: 0 5px;
    line-height: 1;
    transition: color 0.2s ease;
}

.comment-delete-btn:hover {
    color: #ff6b6b;
}

.comment-content {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.5;
    word-wrap: break-word;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.9em;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.3s ease;
}

.comment-input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.comment-submit-btn {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.login-prompt {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 15px;
    background: var(--filter-bg);
}

@media (max-width: 600px) {
    .comments-toggle-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .comment {
        padding: 10px;
    }
    
    .comment-profile-picture,
    .comment-profile-placeholder {
        width: 24px;
        height: 24px;
    }
    
    .comment-username {
        font-size: 0.85em;
    }
    
    .comment-content {
        font-size: 0.85em;
    }
}

/* Rating Section Styles - Now inline in header (see .rating-section-inline) */

@media (max-width: 600px) {
    .rating-section-inline .star {
        font-size: 1.1em;
    }
    
    .rating-section-inline .rating-info {
        font-size: 0.8em;
    }
}
