:root {
    --bg-body: #0a0a0a;
    --bg-card: rgba(23, 23, 23, 0.7); /* Translucent */
    --bg-input: rgba(255, 255, 255, 0.05);
    
    --primary: #6366f1; /* Indigo-500 */
    --primary-glow: rgba(99, 102, 241, 0.4);
    --primary-hover: #4f46e5;
    
    --text-main: #ededed;
    --text-muted: #a1a1aa;
    
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --success: #10b981;
    --danger: #ef4444;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    padding-bottom: 5rem;
    min-height: 100vh;
    /* Ambient Background Mesh */
    background-image: 
        radial-gradient(circle at 50% 0%, #1e1b4b 0%, transparent 40%),
        radial-gradient(circle at 80% 10%, rgba(99, 102, 241, 0.15) 0%, transparent 20%);
    background-attachment: fixed;
}

/* Typography & Links */
a { text-decoration: none; color: inherit; transition: 0.2s; }
h1, h2, h3, h4 { letter-spacing: -0.02em; font-weight: 600; }

/* Utilities */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-center { text-align: center; }
.mt-4 { margin-top: 2.5rem; } .mb-4 { margin-bottom: 2rem; }
.hidden { display: none; }

/* --- Navbar (Glass) --- */
.navbar {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 3rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 25px var(--primary-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-main);
}

.btn-danger { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }
.btn-success { background: var(--success); color: white; }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-block { width: 100%; display: flex; }

/* --- Forms (Sleek Inputs) --- */
.form-group { margin-bottom: 1.2rem; }
label { display: block; margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--bg-input); /* Ensure background is dark */
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: white; /* Ensure text is white */
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
    appearance: none; /* Removes default browser arrow styling */
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Add a custom arrow for select boxes */
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem; /* Make room for the arrow */
    cursor: pointer;
}

/* Fix the dropdown options background */
.form-control option {
    background-color: #1e1b4b; /* Dark blue background for options */
    color: white; /* White text */
    padding: 10px;
}

.form-control:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
/* --- Cards (Glassy) --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr; /* Fixed width sidebar, fluid main */
    gap: 2rem;
    align-items: start;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px); /* The Frosted Glass Effect */
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
}

/* --- Tabs --- */
.tab-header {
    display: flex;
    background: rgba(0,0,0,0.2);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--bg-input);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* --- Pending List --- */
.changes-list { display: flex; flex-direction: column; gap: 0.5rem; }
.change-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.change-info { display: flex; align-items: center; gap: 0.8rem; }
.badge { font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.badge-add { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-issue { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.delete-btn {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    transition: 0.2s;
}
.delete-btn:hover { background: rgba(255,255,255,0.1); color: var(--danger); }

/* ... (Keep all previous CSS the same until the Radios Grid section) ... */

/* --- Live Database (Grid) --- */
.radios-section { margin-top: 4rem; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }

.radios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}

.radio-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    position: relative; /* Needed for absolute overlay */
    overflow: hidden;
    transition: all 0.2s ease;
    height: 120px; /* Fixed height makes grid look cleaner */
}

/* The visible content */
.radio-content {
    padding: 1.2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.radio-header h4 { 
    font-size: 1rem; 
    color: white; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.radio-body { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.genre-tag { font-size: 0.75rem; color: var(--text-muted); background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 10px; }
.flag { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); opacity: 0.6; }

/* The Hover Overlay */
.radio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.85); /* Dark semi-transparent background */
    backdrop-filter: blur(4px); /* Blur the content behind */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.2s ease;
}

/* Show overlay on hover */
.radio-card:hover .radio-overlay {
    opacity: 1;
}

.radio-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.btn-icon {
    width: 80%; /* Nice wide buttons */
    justify-content: center;
    font-weight: 600;
}
.radio-header h4 { font-size: 1rem; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flag { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); opacity: 0.6; }
.radio-body { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.genre-tag { font-size: 0.75rem; color: var(--text-muted); background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 10px; }
.play-btn { color: var(--primary); font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.play-btn:hover { color: #818cf8; }

/* Responsive */
@media (max-width: 800px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .navbar { padding: 1rem; }
}