/* Base styles with modern enhancements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: #333;
}

/* Dashboard page — optional BG image via /dynamic-style.css */
body.dashboard-page {
    position: relative;
}

body.dashboard-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 58, 138, 0.1);
    backdrop-filter: blur(2px);
    z-index: -1;
}

/* Username display - modern glassmorphism */
.username-display {
    position: fixed;
    top: 80px;
    right: 20px;
    color: #28a745;
    font-size: 18px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 999;
    transition: all 0.3s ease;
}

.username-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Wrapper for pages with sticky nav */
body.has-sticky-nav {
    padding-top: 0;
}

body.has-sticky-nav .admin-container {
    padding: 20px;
    background: transparent;
}

/* Flash Messages - Enhanced with animations */
.success-message, .error-message, .warning-message, .info-message {
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.4s ease-out;
    border-left: 4px solid;
}

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

.success-message {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.error-message {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.warning-message {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.info-message {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
}

.auth-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 48px;
    max-width: 450px;
    width: 100%;
    animation: fadeInUp 0.6s ease-out;
}

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

.auth-box h2 {
    margin-bottom: 24px;
    color: #333;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Styles - Enhanced */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 15px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
    transform: translateY(-1px);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #888;
    font-size: 14px;
}

.radio-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: normal;
    cursor: pointer;
    transition: color 0.2s;
}

.radio-group label:hover {
    color: #1e3a8a;
}

.radio-group input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

/* Buttons - Enhanced with better hover effects */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.5);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #212529;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Auth Links */
.auth-links {
    margin-top: 24px;
    text-align: center;
}

.auth-links a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.auth-links a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.create-account-link {
    font-size: 18px;
}

/* Player Container */
.player-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.player-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-header h1 {
    font-size: 32px;
    font-weight: 700;
}

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

.player-content {
    padding: 40px;
}

.audio-player {
    margin-bottom: 32px;
}

.audio-player audio {
    width: 100%;
    border-radius: 12px;
}

.stream-info {
    margin-bottom: 32px;
    text-align: center;
}

.stream-info h2 {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    font-weight: 700;
}

.stream-url-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stream-url-box input {
    width: 100%;
    padding: 14px;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    margin: 12px 0;
    font-family: 'Monaco', 'Courier New', monospace;
    background: white;
    transition: all 0.3s;
}

.stream-url-box input:focus {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
    outline: none;
}

.instructions {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 24px;
    border-radius: 16px;
    border-left: 4px solid #1e3a8a;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
}

.instructions ul {
    margin: 16px 0;
    padding-left: 28px;
}

.instructions li {
    margin: 10px 0;
}

/* Admin Styles */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* Sticky Navigation Header - Enhanced */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin: 0;
    border-radius: 0;
}

.admin-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
}

.admin-header h1 {
    color: white;
    font-size: 28px;
    font-weight: 700;
}

.admin-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Navigation buttons in sticky header - Enhanced */
.admin-header .btn {
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 600;
    border-radius: 10px;
}

/* Grey navigation buttons (default) */
.btn-nav {
    background: rgba(108, 117, 125, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-nav:hover {
    background: rgba(90, 98, 104, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Grey navigation buttons (active/current page) */
.btn-nav-active {
    background: rgba(73, 80, 87, 1);
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-nav-active:hover {
    background: rgba(52, 58, 64, 1);
    transform: translateY(-2px);
}

/* Red navigation buttons (Security, Logout) */
.btn-nav-red {
    background: rgba(220, 53, 69, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-nav-red:hover {
    background: rgba(200, 35, 51, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Red navigation buttons (active) */
.btn-nav-red-active {
    background: rgba(189, 33, 48, 1);
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-nav-red-active:hover {
    background: rgba(167, 29, 42, 1);
    transform: translateY(-2px);
}

.admin-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.admin-section:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.admin-section h2 {
    margin-bottom: 24px;
    color: #333;
    font-weight: 700;
    font-size: 24px;
}

/* Stats Grid - Enhanced */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(30, 58, 138, 0.2);
}

.stat-alert {
    border: 2px solid #ffc107;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
}

.stat-alert:hover {
    box-shadow: 0 16px 48px rgba(255, 193, 7, 0.3);
}

.stat-card h3 {
    color: #666;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 52px;
    font-weight: 800;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 12px 0;
    line-height: 1;
}

.stat-card p {
    color: #888;
    font-size: 14px;
    font-weight: 500;
}

.stat-link {
    display: inline-block;
    margin-top: 12px;
    color: #1e3a8a;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.stat-link:hover {
    color: #3b82f6;
    text-decoration: underline;
    transform: translateX(4px);
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.action-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 20px;
    padding: 28px;
    color: white;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px rgba(30, 58, 138, 0.3);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
}

.action-card:hover::before {
    transform: scale(1);
}

.action-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(30, 58, 138, 0.5);
}

.action-card h3 {
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
}

.action-card p {
    opacity: 0.95;
    font-size: 14px;
    line-height: 1.6;
}

/* Admin Table - Enhanced */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.admin-table th,
.admin-table td {
    padding: 16px;
    text-align: left;
}

.admin-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
}

.admin-table tbody tr {
    background: white;
    transition: all 0.3s ease;
}

.admin-table tbody tr:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.admin-table tbody tr td {
    border-bottom: 1px solid #f1f3f5;
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell form {
    display: inline-block;
    margin-right: 6px;
}

/* Badges - Enhanced */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.badge-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.badge-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.badge-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.badge-secondary {
    background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
    color: #383d41;
}

/* Pending Request Card - Enhanced */
.pending-request-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    border-left: 4px solid #1e3a8a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.pending-request-card:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.15);
}

.pending-request-card h3 {
    color: #333;
    margin-bottom: 12px;
    font-weight: 700;
}

.request-info p {
    margin: 6px 0;
    color: #666;
    line-height: 1.6;
}

.request-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.reject-form {
    margin-top: 16px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

/* Form Container */
.form-container {
    max-width: 600px;
}

.form-container form {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Empty State - Enhanced */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state h2 {
    color: #666;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 28px;
}

.empty-state p {
    color: #888;
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .player-header,
    .admin-header {
        flex-direction: column;
        gap: 16px;
    }

    .admin-nav-container {
        padding: 12px 16px;
    }

    .admin-nav,
    .user-info {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }

    .admin-header .btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .stats-grid,
    .action-grid {
        grid-template-columns: 1fr;
    }

    .admin-table {
        font-size: 14px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
    }

    .admin-container {
        padding: 12px;
        padding-top: 100px;
    }

    .username-display {
        top: 12px;
        right: 12px;
        font-size: 14px;
        padding: 10px 18px;
    }

    .auth-box {
        padding: 32px 24px;
    }

    .stat-number {
        font-size: 42px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: rgba(30, 58, 138, 0.2);
    color: #333;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1e3a8a 100%);
}

/* Optional: table column wrapping (enable by uncommenting)
.admin-table td:nth-child(1),
.admin-table th:nth-child(1) {
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    max-width: 150px;
}

.admin-table td:nth-child(2) {
    word-break: break-all;
    overflow-wrap: anywhere;
    max-width: 200px;
    white-space: normal;
}
*/
