/* ============================================
   BASE STYLES & LAYOUT
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    overflow: hidden;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.header-left:hover {
    opacity: 0.8;
}

.header-logo {
    width: 60px;
    height: 60px;
}

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

.header-text p {
    opacity: 0.9;
    font-size: 0.9em;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.header-btn.primary {
    background: var(--success);
    border-color: var(--success);
}

.header-btn.primary:hover {
    background: #218838;
}

.header-btn.admin {
    background: var(--danger);
    border-color: var(--danger);
    padding: 10px 15px;
}

.header-btn.admin:hover {
    background: #c82333;
}

.header-btn.admin.active {
    background: var(--success);
    border-color: var(--success);
}

/* ============================================
   SEARCH & CONTROLS - ENHANCED
   ============================================ */

.search-section {
    margin: 20px 0 30px 0;
    padding: 0 7px;
}

.search-box {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    background: var(--card-bg);
    border: 3px solid var(--secondary);
    border-radius: 15px;
    padding: 4px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3em;
    color: var(--secondary);
    pointer-events: none;
    z-index: 1;
}

#searchInput {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    background: transparent;
    color: var(--text-primary);
}

#searchInput::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

#searchInput:focus {
    outline: none;
}

.controls {
    padding: 0px 15px;
    background: #f8f9fa;
    border-bottom: 3px solid #e9ecef;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ============================================
   STATS BAR
   ============================================ */

.stats {
    padding: 10px 7px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stat-item { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.stat-item strong { 
    color: #0f3460; 
    font-size: 1em; 
    display: block; 
}

/* ============================================
   SECTIONS
   ============================================ */

.live-section {
    margin-bottom: 40px;
    padding: 0 17px;
}

.directory-section {
    margin-top: 40px;
    padding: 0 7px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.section-header #djFilterPill {
    margin-left: auto;
}

.section-header h2 {
    font-size: 2em;
    font-weight: 700;
}

/* ============================================
   ADMIN CONTROLS
   ============================================ */

.admin-only {
    display: none;
}

.btn.admin-only.visible {
    display: inline-block !important;
}

.stats.admin-only {
    display: none !important;
}

.stats.admin-only.visible {
    display: flex !important;
}