/*==================================================
    IndiaRadio 2026 - App Styles (Optimized)
    Only duplicates removed, all features kept
==================================================*/

/*========== ROOT VARIABLES ==========*/
:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1d212a;
    --border: #2b313c;
    --text: #ffffff;
    --text-soft: #d5d8df;
    --text-muted: #9aa4b2;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.20);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.35);
    --transition: 0.25s ease;
    --container: 1300px;
}

/*========== RESET ==========*/
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.20s ease;
}

button {
    border: none;
    outline: none;
    background: none;
    cursor: pointer;
    transition: var(--transition);
    font: inherit;
}

input {
    font: inherit;
    outline: none;
}

ul {
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

::selection {
    background: var(--primary);
    color: #fff;
}

/*========== TYPOGRAPHY ==========*/
h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 700;
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(22px, 3vw, 32px);
    margin-bottom: 18px;
    font-weight: 700;
}

h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

p {
    color: var(--text-soft);
}

/*========== LAYOUT ==========*/
.container {
    width: min(100% - 24px, var(--container));
    margin: auto;
    padding-block: 10px 40px;
}

@media (min-width: 576px) {
    .container { width: min(100% - 30px, var(--container)); }
}
@media (min-width: 768px) {
    .container { width: min(100% - 42px, var(--container)); }
}
@media (min-width: 992px) {
    .container { width: min(100% - 56px, var(--container)); }
}
@media (min-width: 1200px) {
    .container { width: min(100% - 70px, var(--container)); }
}
@media (min-width: 1400px) {
    .container { width: min(100% - 80px, var(--container)); }
}

/*========== HEADER ==========*/
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 72px;
    padding: 0 18px;
    background: rgba(15, 17, 21, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.logo {
    flex: 1;
    display: flex;
    align-items: center;
}
.logo a { display: flex; align-items: center; }
.logo img {
    height: 46px;
    width: auto;
    transition: transform 0.25s ease;
}
.logo img:hover { transform: scale(1.04); }

@media (max-width: 480px) {
    .header { height: 62px; padding: 0 8px; gap: 8px; }
    .logo { flex: 1; min-width: 0; }
    .logo img { height: 36px; }
}
@media (min-width: 992px) {
    .header { padding: 0 26px; height: 74px; }
    .logo img { height: 50px; }
}

/*========== HEADER BUTTONS ==========*/
.theme-btn,
.menu-btn {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 18px;
    transition: background 0.25s, border-color 0.25s, transform 0.20s, box-shadow 0.25s;
}

.theme-btn:hover,
.menu-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(124, 58, 237, 0.30);
}

.theme-btn:active,
.menu-btn:active { transform: scale(0.96); }
.theme-btn:focus-visible,
.menu-btn:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .theme-btn, .menu-btn { width: 36px; height: 36px; font-size: 16px; border-radius: 12px; }
}

/*========== SEARCH ==========*/
.search-wrapper {
    display: none;
    padding: 14px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.search-wrapper.show-search { display: block; }

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 2px solid var(--primary);
    border-radius: 16px;
    overflow: hidden;
}

.search-icon {
    padding: 0 14px;
    font-size: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

#searchInput {
    flex: 1;
    height: 52px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    padding: 0;
}
#searchInput::placeholder { color: var(--text-muted); }

.search-clear-btn {
    display: none;
    width: 46px;
    height: 52px;
    background: transparent;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
}
.search-clear-btn.show { display: block; }

.search-close-btn {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.search-close-btn:hover { background: var(--primary); color: #fff; }

.search-go-btn {
    width: 54px;
    height: 52px;
    border: none;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}
.search-go-btn:hover { background: var(--primary-dark); }

#searchResults {
    margin-top: 12px;
    max-height: 360px;
    overflow-y: auto;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.search-item:hover { background: var(--surface-2); }

.search-thumb {
    width: 52px;
    height: 52px;
    min-width: 52px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}
.search-item span {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}

/*========== SIDEBAR ==========*/
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.30s ease, visibility 0.30s ease;
    z-index: 999;
}
.overlay.show { opacity: 1; visibility: visible; }

.side-menu {
    position: fixed;
    top: 0;
    left: -340px;
    right: auto;
    width: 320px;
    max-width: 88vw;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
    transition: right 0.30s ease;
    z-index: 1000;
    padding: 22px;
}
.side-menu.open { left: 0; }

.side-menu::-webkit-scrollbar { width: 8px; }
.side-menu::-webkit-scrollbar-thumb { background: #444; border-radius: 30px; }
.side-menu::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.menu-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 24px;
}

.close-btn {
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: #fff;
    font-size: 18px;
    transition: 0.25s;
}
.close-btn:hover { background: var(--primary); }

.side-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 50px;
    padding: 0 16px;
    border-radius: 14px;
    color: var(--text-soft);
    transition: 0.25s;
    margin-bottom: 8px;
    font-weight: 500;
}
.side-menu a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateX(6px);
}
.side-menu a.active {
    background: var(--primary);
    color: #fff;
}

.sidebar-app {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.sidebar-app p {
    margin-bottom: 14px;
    color: var(--text-soft);
    font-size: 15px;
}
.play-badge {
    width: 180px;
    margin: auto;
    transition: 0.25s;
}
.play-badge:hover { transform: scale(1.04); }

@media (max-width: 420px) {
    .side-menu { width: 290px; padding: 18px; }
}

/*========== FOOTER ==========*/
.footer {
    margin-top: 5px;
    background: linear-gradient(180deg, var(--surface), var(--bg));
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 50px 22px;
}

.footer-col {
    display: flex;
    flex-direction: column;
}
.footer-col h3 {
    margin-bottom: 18px;
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
}
.footer-col a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    color: var(--text-soft);
    transition: 0.25s;
}
.footer-col a:hover {
    color: var(--primary-light);
    padding-left: 8px;
}

.footer-about img {
    width: 190px;
    margin-bottom: 18px;
}
.footer-about p {
    max-width: 420px;
    color: var(--text-soft);
    line-height: 1.8;
}

.footer-playstore {
    display: inline-block;
    margin-top: 18px;
}
.footer-playstore img {
    width: 180px;
    transition: 0.25s;
}
.footer-playstore img:hover { transform: scale(1.04); }

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 65px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
}

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (max-width: 768px) {
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .footer-about { grid-column: 1 / -1; }
}
@media (min-width: 1200px) {
    .footer { margin-top: 90px; }
    .footer-grid { padding: 60px 30px; }
}

/*========== CHIPS ==========*/
.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.20s, box-shadow 0.25s;
    white-space: nowrap;
}
.chip:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.28);
}
.chip:active { transform: scale(0.97); }
.chip:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .chip { min-height: 38px; padding: 0 14px; font-size: 13px; }
}

/*========== FORMS ==========*/
input, textarea, select {
    width: 100%;
    padding: 14px 16px;
    min-height: 50px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

textarea { min-height: 140px; resize: vertical; }

input::placeholder, textarea::placeholder { color: var(--text-muted); }

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
    background: var(--surface-2);
    outline: none;
}

input:disabled, textarea:disabled, select:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/*========== BUTTONS ==========*/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(124, 58, 237, 0.30);
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/*========== CARDS ==========*/
.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

/*========== SECTIONS ==========*/
section { margin: 42px 0; }
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 42px 0;
    opacity: 0.7;
}
.content-spacing { margin-top: 28px; }
.section-title { margin-bottom: 20px; }

/*========== SCROLLBAR ==========*/
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/*========== UTILITIES ==========*/
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.w-100 { width: 100%; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.rounded { border-radius: 18px; }
.shadow { box-shadow: var(--shadow); }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.pt-20 { padding-top: 20px; }
.pb-20 { padding-bottom: 20px; }

.fade { animation: fadeIn 0.3s ease; }

/*========== ANIMATIONS ==========*/
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.fade-in { animation: fadeIn 0.35s ease; }
.fade-up { animation: fadeUp 0.40s ease; }
.scale-in { animation: scaleIn 0.30s ease; }

/*========== LIGHT MODE ==========*/
.light-mode {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-2: #f2f5fa;
    --border: #dde3ec;
    --text: #1f2937;
    --text-soft: #4b5563;
    --text-muted: #6b7280;
}

/*========== REDUCED MOTION ==========*/
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto;
    }
}

/*========== PRINT ==========*/
@media print {
    * {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    .header, .footer, .side-menu, .overlay, .theme-btn, .menu-btn, #searchWrapper {
        display: none !important;
    }
    .container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
}

/*========== RICH CONTENT (SUMMERNOTE) ==========*/
.content-box {
    color: var(--text-soft);
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.content-box ul { list-style: disc; padding-left: 28px; margin: 18px 0; }
.content-box ol { list-style: decimal; padding-left: 28px; margin: 18px 0; }
.content-box a {
    color: var(--primary-light);
    word-break: break-word;
}
.content-box a:hover { color: #fff; }

.content-box table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    overflow-x: auto;
}
.content-box th {
    background: var(--surface-2);
    color: var(--text);
    font-weight: 600;
}
.content-box th,
.content-box td {
    border: 1px solid var(--border);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

.content-box code {
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 6px;
    font-family: monospace;
}
.content-box pre {
    background: #111827;
    color: #fff;
    padding: 16px;
    border-radius: 12px;
    overflow: auto;
    margin: 24px 0;
}
.content-box pre code { background: none; padding: 0; }
.content-box strong { color: var(--text); font-weight: 700; }
.content-box em { font-style: italic; }

@media (max-width: 768px) {
    .content-box table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}