:root {
    --paper: #f0e6d2;
    --ink: #2b2b2b;
    --maroon: #630000;
    --gold: #b8860b;
    --card-bg: #fffbf0;
    --shadow: rgba(0,0,0,0.08);
    --font-scale: 1;
}

[data-theme="dark"] {
    --paper: #101012;
    --ink: #e0e0e0;
    --maroon: #ff6b6b;
    --gold: #ffd700;
    --card-bg: #1c1c1f;
    --shadow: rgba(0,0,0,0.5);
}

body {
    background-color: var(--paper);
    background-image: url("https://www.transparenttextures.com/patterns/cream-paper.png");
    color: var(--ink);
    font-family: 'Playfair Display', serif;
    margin: 0;
    transition: 0.5s;
    overflow-x: hidden;
}

/* Animations */
@keyframes float { 
    0% { transform: translateY(0px); } 
    50% { transform: translateY(-6px); } 
    100% { transform: translateY(0); } 
}

@keyframes cardUp { 
    from { opacity: 0; transform: translateY(30px); } 
    to { opacity: 1; transform: translateY(0); } 
}

@keyframes floatHeart { 
    0% { transform: translateY(0) scale(1); opacity: 1; } 
    100% { transform: translateY(-50px) scale(1.5); opacity: 0; } 
}

@keyframes shine { 
    to { background-position: 200% center; } 
}

@keyframes spinSlow { 
    from { transform: rotate(0deg); } 
    to { transform: rotate(360deg); } 
}

/* Header */
header { 
    text-align: center; 
    padding: 60px 20px 30px; 
    position: relative; 
    overflow: hidden; 
}

.title-container { 
    display: inline-block; 
    position: relative; 
    animation: float 6s ease-in-out infinite; 
}

.diwan-title { 
    font-family: 'Cinzel Decorative', cursive; 
    font-size: 3rem; 
    margin: 0; 
    letter-spacing: 0.1em; 
    text-transform: uppercase; 
    color: transparent; 
    background: linear-gradient(45deg, var(--maroon), var(--gold), var(--maroon)); 
    background-size: 200% auto; 
    -webkit-background-clip: text; 
    background-clip: text; 
    animation: shine 5s linear infinite; 
}

.subtitle { 
    font-style: italic; 
    opacity: 0.7; 
    font-family: 'Lato', sans-serif; 
    margin-top: 15px; 
}

/* Top Controls */
.top-bar { 
    position: fixed; 
    top: 20px; 
    right: 20px; 
    display: flex; 
    gap: 12px; 
    z-index: 500; 
}

.icon-btn { 
    position: relative; 
    background: rgba(255,255,255,0.8); 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border: 1px solid rgba(0,0,0,0.05); 
    cursor: pointer; 
    transition: 0.3s; 
    color: var(--ink); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    backdrop-filter: blur(5px); 
}

.icon-btn:hover { 
    transform: translateY(-3px); 
    color: var(--maroon); 
}

.icon-btn.is-playing { 
    border-color: var(--gold); 
    color: var(--gold); 
}

.icon-btn.is-playing i { 
    animation: spinSlow 3s linear infinite; 
}

.fav-badge::after { 
    content:''; 
    position:absolute; 
    top:8px; 
    right:8px; 
    width:8px; 
    height:8px; 
    background:red; 
    border-radius:50%; 
    display:none; 
}

.has-favs .fav-badge::after { 
    display:block; 
}

/* Search */
.search-wrap { 
    text-align: center; 
    margin-top: 20px; 
}

.search-input { 
    padding: 12px 25px; 
    border-radius: 30px; 
    border: 1px solid var(--gold); 
    width: 85%; 
    max-width: 400px; 
    background: rgba(255,255,255,0.5); 
    outline: none; 
    transition: 0.3s; 
    font-family: 'Lato'; 
    color: var(--ink); 
}

.search-input:focus { 
    background: #fff; 
    box-shadow: 0 0 20px rgba(184,134,11,0.2); 
}

/* Container & Sections */
.container { 
    max-width: 700px; 
    margin: 0 auto; 
    padding: 0 20px 80px; 
}

.section-label { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin: 40px 0 20px; 
}

.section-label span { 
    font-family: 'Cinzel Decorative'; 
    font-size: 1.4rem; 
    color: var(--maroon); 
    white-space: nowrap; 
}

.section-label::after { 
    content:''; 
    height: 2px; 
    background: var(--gold); 
    width: 100%; 
    opacity: 0.3; 
}

/* Sher of the moment */
#moment-card { 
    background: linear-gradient(135deg, var(--card-bg), var(--paper)); 
    border: 2px solid var(--gold); 
    padding: 25px; 
    border-radius: 15px; 
    text-align: center; 
    margin-bottom: 30px; 
    position: relative; 
    box-shadow: 0 10px 30px rgba(184, 134, 11, 0.15); 
    animation: float 8s ease-in-out infinite reverse; 
}

.moment-badge { 
    background: var(--gold); 
    color: #fff; 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    position: absolute; 
    top: -12px; 
    left: 50%; 
    transform: translateX(-50%); 
}

/* ================= TAJ E SUKHAN (ROYAL TABS & CARDS) ================= */
.taj-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.taj-tab {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--ink);
    padding: 6px 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
[data-theme="dark"] .taj-tab { color: var(--gold); }

.taj-tab.active {
    background: var(--gold);
    color: #000;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(184, 134, 11, 0.3);
}

.taj-tab:hover:not(.active) {
    background: rgba(184, 134, 11, 0.15);
}

.royal-card { 
    background: linear-gradient(145deg, var(--card-bg), #fff); 
    border: 2px solid var(--gold); 
    padding: 30px; 
    border-radius: 15px; 
    text-align: center; 
    position: relative; 
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.12); /* Glow mild kar diya gaya hai */
    margin-bottom: 40px; 
}

[data-theme="dark"] .royal-card {
    background: linear-gradient(145deg, #2a0000, #110000); 
    background-image: url("https://www.transparenttextures.com/patterns/dark-matter.png"); 
}

.royal-badge { 
    background: linear-gradient(45deg, var(--gold), #ffd700); 
    color: #000; 
    padding: 6px 18px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    font-weight: bold; 
    position: absolute; 
    top: -15px; 
    left: 50%; 
    transform: translateX(-50%); 
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.4); 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    white-space: nowrap;
}

.royal-card .poet-link { 
    color: var(--maroon); 
    font-weight: bold;
    font-size: 0.95rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    cursor: pointer; 
    display: inline-block; 
    margin-bottom: 15px; 
    border-bottom: 1px solid transparent; 
    transition: 0.3s; 
}
[data-theme="dark"] .royal-card .poet-link { color: var(--gold); }

.royal-card .poet-link:hover { border-bottom: 1px solid var(--maroon); }
[data-theme="dark"] .royal-card .poet-link:hover { border-bottom: 1px solid var(--gold); }

.royal-card .sher-text { 
    color: #000; 
    font-weight: 500;
}
[data-theme="dark"] .royal-card .sher-text { color: #f0e6d2; }

.royal-empty-text {
    color: #444; font-family: 'Lato'; font-size: 0.95rem; line-height: 1.6;
}
[data-theme="dark"] .royal-empty-text { color: var(--gold); opacity: 0.8; }

.shayar-title {
    color: var(--maroon); font-family: 'Cinzel Decorative'; margin: 30px 0 10px; font-size: 2rem;
}
[data-theme="dark"] .shayar-title { color: var(--gold); }

.shayar-wah-text {
    color: #000; font-family: 'Lato'; font-size: 1rem; margin-bottom: 25px;
}
[data-theme="dark"] .shayar-wah-text { color: #ddd; }

.royal-footer { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 20px; 
    margin-top: 25px; 
    border-top: 1px dashed rgba(184, 134, 11, 0.4); 
    padding-top: 20px; 
}

.royal-wah { 
    background: rgba(184, 134, 11, 0.15); 
    border: 1px solid var(--gold); 
    color: var(--gold); 
}

.royal-wah:hover { 
    background: var(--gold); 
    color: #000; 
}

.royal-share { 
    color: var(--gold); 
    font-size: 1.5rem; 
}

.royal-share:hover { 
    color: #fff; 
    transform: scale(1.1); 
}

/* Collections */
.collections-grid { 
    display: flex; 
    overflow-x: auto; 
    gap: 15px; 
    padding-bottom: 10px; 
    scroll-behavior: smooth; 
    -webkit-overflow-scrolling: touch; 
}

.collections-grid::-webkit-scrollbar { 
    display: none; 
}

.collection-card { 
    min-width: 160px; 
    height: 100px; 
    border-radius: 12px; 
    padding: 15px; 
    position: relative; 
    overflow: hidden; 
    cursor: pointer; 
    transition: 0.3s; 
    display: flex; 
    align-items: flex-end; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
    color: #fff; 
    border: 1px solid rgba(255,255,255,0.1); 
    flex-shrink: 0; 
}

/* Ghazal list */
.ghazal-list { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.ghazal-tile { 
    background: var(--card-bg); 
    padding: 18px; 
    border-radius: 8px; 
    border-left: 4px solid var(--gold); 
    cursor: pointer; 
    transition: 0.3s; 
    box-shadow: 0 2px 8px var(--shadow); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.ghazal-tile:hover { 
    transform: translateX(5px); 
    border-left-color: var(--maroon); 
}

.ghazal-tile-title { 
    font-weight: bold; 
    color: var(--ink); 
}

.ghazal-tile-poet { 
    font-size: 0.8rem; 
    color: #888; 
}

/* ================= POETS GRID & TABS ================= */
.poet-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); 
    gap: 15px; 
}

.poet-tabs {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    scroll-behavior: smooth;
}
.poet-tabs::-webkit-scrollbar { display: none; }

.poet-tab {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--ink);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Lato', sans-serif;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}
[data-theme="dark"] .poet-tab { color: var(--gold); }

.poet-tab.active {
    background: var(--maroon);
    color: #fff;
    border-color: var(--maroon);
    font-weight: bold;
}
[data-theme="dark"] .poet-tab.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.poet-tile { 
    background: var(--card-bg); 
    padding: 20px 10px; 
    border-radius: 12px; 
    text-align: center; 
    border: 1px solid transparent; 
    cursor: pointer; 
    transition: 0.3s; 
    box-shadow: 0 5px 15px var(--shadow); 
}

.poet-tile:hover { 
    transform: translateY(-5px); 
    border-color: var(--gold); 
    background: var(--maroon); 
}

.poet-tile:hover * { 
    color: #fff !important; 
}

.poet-tile i { 
    font-size: 1.8rem; 
    color: var(--gold); 
    margin-bottom: 10px; 
    display: block; 
}

.poet-name { 
    font-weight: bold; 
    font-size: 0.85rem; 
    color: var(--ink); 
}

/* Cards & Feed */
.ghazal-card { 
    background: var(--card-bg); 
    padding: 35px; 
    margin-bottom: 35px; 
    border-radius: 12px; 
    box-shadow: 0 15px 40px var(--shadow); 
    text-align: center; 
    position: relative; 
    border-top: 4px solid var(--maroon); 
}

.poet-tag { 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    color: #999; 
    border: 1px solid #ddd; 
    padding: 4px 12px; 
    border-radius: 20px; 
    display: inline-block; 
    margin-bottom: 20px; 
    transition: 0.3s; 
}

.poet-tag:hover { 
    background: var(--maroon); 
    color: #fff; 
    border-color: var(--maroon); 
}

.sher-text { 
    margin: 10px 0 30px; 
    min-height: 80px; 
}

.urdu { 
    font-family: 'Noto Nastaliq Urdu', serif; 
    font-size: calc(1.5rem * var(--font-scale)); 
    line-height: 2.0; 
    color: var(--ink); 
}

.hindi { 
    font-size: calc(1.4rem * var(--font-scale)); 
    line-height: 1.6; 
    color: var(--ink); 
}

.roman { 
    font-family: 'Lato', sans-serif; 
    font-size: calc(1.3rem * var(--font-scale)); 
    line-height: 1.6; 
    font-style: normal; 
    color: var(--ink); 
    font-weight: 400; 
    opacity: 0.9; 
}

/* DICTIONARY */
.dict-word { 
    border-bottom: 2px dotted var(--gold); 
    cursor: help; 
    transition: 0.3s; 
    position: relative; 
    color: var(--maroon); 
    font-weight: 500; 
}

.dict-word:hover { 
    background: rgba(184,134,11,0.15); 
    border-bottom-style: solid; 
}

.dict-box { 
    background: var(--card-bg); 
    width: 90%; 
    max-width: 350px; 
    border-radius: 15px; 
    padding: 30px; 
    text-align: center; 
    border: 2px double var(--gold); 
    box-shadow: 0 20px 60px rgba(0,0,0,0.4); 
    animation: cardUp 0.3s ease-out; 
}

.dict-icon { 
    font-size: 3rem; 
    margin-bottom: 15px; 
}

.dict-sep { 
    width: 50px; 
    height: 2px; 
    background: var(--gold); 
    margin: 15px auto; 
}

#dict-word { 
    color: var(--maroon); 
    margin: 0; 
    font-family: 'Cinzel Decorative'; 
    font-size: 1.8rem; 
}

#dict-meaning { 
    font-size: 1.2rem; 
    line-height: 1.6; 
    color: var(--ink); 
    font-style: italic; 
}

/* ================= WAH WAH BUTTONS & BADGES (CLEAN UI) ================= */
.card-footer { 
    margin-top: 20px; 
    padding-top: 20px; 
    border-top: 1px dashed rgba(0,0,0,0.1); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.wah-btn {
    background: var(--maroon); 
    color: #fff; 
    border: none; 
    padding: 8px 25px; 
    border-radius: 50px;
    font-family: 'Noto Nastaliq Urdu'; 
    cursor: pointer; 
    transition: 0.2s; 
    position: relative; 
    overflow: hidden;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.wah-btn:active { 
    transform: scale(0.95); 
}

.wah-count-badge {
    background: rgba(0, 0, 0, 0.2); 
    padding: 1px 8px; 
    border-radius: 12px;
    font-family: 'Lato', sans-serif; 
    font-size: 0.8rem; 
    font-weight: bold;
    margin-left: 8px; 
    color: #fff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

.wah-count-badge:empty { 
    display: none; 
}

.royal-wah .wah-count-badge { 
    background: rgba(184, 134, 11, 0.3); 
    color: var(--gold); 
}

.royal-wah:hover .wah-count-badge { 
    color: #000; 
    background: rgba(0,0,0,0.2); 
}

.heart-particle { 
    position: absolute; 
    pointer-events: none; 
    animation: floatHeart 1s ease-out forwards; 
    font-size: 1.2rem; 
}

.actions { 
    display: flex; 
    gap: 18px; 
    font-size: 1.3rem; 
    color: #aaa; 
}

.action-icon:hover { 
    color: var(--maroon); 
    cursor: pointer; 
    transform: scale(1.2); 
}

.action-icon.active { 
    color: #e91e63 !important; 
}

.delete-icon:hover { 
    color: red !important; 
}

/* Modals & Ambience */
.modal-overlay { 
    display: none; 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.85); 
    z-index: 3000; 
    align-items: center; 
    justify-content: center; 
    backdrop-filter: blur(5px); 
}

.ambience-box { 
    background: var(--card-bg); 
    width: 90%; 
    max-width: 400px; 
    border-radius: 12px; 
    padding: 0; 
    overflow: hidden; 
    text-align: center; 
}

.ambience-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    padding: 20px; 
}

.ambience-card { 
    background: rgba(0,0,0,0.03); 
    border: 1px solid rgba(0,0,0,0.05); 
    border-radius: 10px; 
    padding: 20px; 
    cursor: pointer; 
    transition: 0.2s; 
}

.ambience-card:hover { 
    transform: translateY(-3px); 
    border-color: var(--gold); 
}

.ambience-card.active { 
    background: var(--maroon); 
    color: #fff; 
    border-color: var(--maroon); 
}

.amb-icon { 
    font-size: 2rem; 
    margin-bottom: 8px; 
}

.amb-name { 
    font-family: 'Lato', sans-serif; 
    font-weight: bold; 
}

/* ===== STUDIO STYLES ===== */
.studio-box { 
    width: 100%; 
    max-width: 900px; 
    background: #fff; 
    padding: 0; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    border-radius: 0; 
}

@media (min-width: 768px) { 
    .studio-box { 
        height: 85vh; 
        width: 95%; 
        border-radius: 12px; 
    } 
}

.studio-header { 
    padding: 15px 20px; 
    border-bottom: 1px solid #eee; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #f9f9f9; 
    flex-shrink: 0; 
}

.studio-body { 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    height: 100%; 
}

/* PREVIEW AREA */
.preview-container { 
    flex: 1; 
    background: #e0e0e0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 20px; 
    overflow: hidden; 
    position: relative; 
}

#generator-canvas { 
    background-size: cover; 
    background-position: center; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    padding: 40px; 
    position: relative; 
    transition: all 0.3s ease; 
    width: 100%; 
    height: 100%; 
}

.aspect-square { 
    aspect-ratio: 1 / 1; 
    max-width: 350px; 
    max-height: 350px; 
}

.aspect-story { 
    aspect-ratio: 9 / 16; 
    max-width: 320px; 
    max-height: 568px; 
}

.gen-watermark { 
    font-family: 'Cinzel Decorative', cursive; 
    font-size: 0.7rem; 
    letter-spacing: 3px; 
    opacity: 0.6; 
    position: absolute; 
    top: 20px; 
    width: 100%; 
    text-align: center; 
}

.gen-content-wrap { 
    width: 100%; 
    z-index: 2; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}

.gen-sher { 
    line-height: 1.8; 
    margin-bottom: 15px; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    font-family: 'Noto Nastaliq Urdu', serif; 
    word-wrap: break-word; 
}

.gen-poet { 
    font-family: 'Playfair Display', serif; 
    font-style: italic; 
    font-size: 1.1rem; 
    margin-top: 10px; 
}

.gen-poet::before { 
    content: '— '; 
    color: var(--gold); 
}

.gen-handle { 
    font-family: 'Lato', sans-serif; 
    font-size: 0.75rem; 
    opacity: 0.8; 
    letter-spacing: 1px; 
    text-transform: uppercase; 
    position: absolute; 
    bottom: 20px; 
    width: 100%; 
    text-align: center; 
}

/* CONTROLS PANEL */
.controls-panel { 
    background: #fff; 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    border-top: 1px solid #eee; 
    overflow-y: auto; 
    max-height: 40vh; 
    flex-shrink: 0; 
}

@media (min-width: 768px) { 
    .studio-body { 
        flex-direction: row; 
    } 
    .controls-panel { 
        width: 320px; 
        border-left: 1px solid #eee; 
        border-top: none; 
        max-height: 100%; 
    } 
}

.control-group label { 
    display: block; 
    font-size: 0.75rem; 
    font-weight: bold; 
    color: #888; 
    margin-bottom: 8px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

.control-group input[type="text"] { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    font-family: 'Lato'; 
}

.btn-group { 
    display: flex; 
    gap: 10px; 
}

.ctrl-btn { 
    flex: 1; 
    padding: 10px; 
    border: 1px solid #ddd; 
    background: #f5f5f5; 
    cursor: pointer; 
    border-radius: 6px; 
    font-size: 0.9rem; 
    transition: 0.2s; 
}

.ctrl-btn.active { 
    background: var(--maroon); 
    color: #fff; 
    border-color: var(--maroon); 
}

.slider { 
    width: 100%; 
    cursor: pointer; 
}

/* THEMES WITH PROPER URDU/ROMAN ISOLATION */
.theme-grid { 
    display: flex; 
    gap: 12px; 
    overflow-x: auto; 
    padding-bottom: 5px; 
}

.theme-dot { 
    width: 35px; 
    height: 35px; 
    border-radius: 50%; 
    cursor: pointer; 
    border: 2px solid rgba(0,0,0,0.1); 
    flex-shrink: 0; 
}

.theme-dot:hover { 
    transform: scale(1.1); 
}

.theme-dot.selected { 
    border-color: var(--maroon); 
    transform: scale(1.1); 
    box-shadow: 0 0 5px rgba(0,0,0,0.2); 
}

.theme-paper { 
    background-image: url("https://www.transparenttextures.com/patterns/cream-paper.png"); 
    background-color: #fdfbf7; 
    color: #2b2b2b; 
}

.theme-paper .gen-sher.roman { 
    font-family: 'Playfair Display', serif; 
    font-style: italic; 
}

.t-paper { 
    background: #fdfbf7; 
}

.theme-gold { 
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%); 
    color: #d4af37 !important; 
}

.theme-gold .gen-sher.roman, 
.theme-gold .gen-poet, 
.theme-gold .gen-handle, 
.theme-gold .gen-watermark { 
    color: #d4af37 !important; 
    font-family: 'Cinzel Decorative', cursive; 
}

.theme-gold .gen-sher.urdu { 
    color: #d4af37 !important; 
} 

.t-gold { 
    background: #000; 
    border-color: #d4af37; 
}

.theme-noir { 
    background: #111; 
    color: #f5f5f5 !important; 
}

.theme-noir .gen-sher.roman, 
.theme-noir .gen-poet, 
.theme-noir .gen-handle { 
    color: #f5f5f5 !important; 
    font-family: 'Special Elite', monospace; 
}

.theme-noir .gen-sher.urdu { 
    color: #f5f5f5 !important; 
} 

.theme-noir .gen-watermark { 
    opacity: 0.3; 
}

.t-noir { 
    background: #111; 
    border-color: #555; 
}

.theme-sufi { 
    background: #1a3322; 
    color: #e3d2a1 !important; 
}

.theme-sufi .gen-sher.roman, 
.theme-sufi .gen-poet, 
.theme-sufi .gen-handle { 
    color: #e3d2a1 !important; 
    font-family: 'Reem Kufi', sans-serif; 
}

.theme-sufi .gen-sher.urdu { 
    color: #e3d2a1 !important; 
} 

.t-sufi { 
    background: #1a3322; 
}

.theme-love { 
    background: #3e0707; 
    color: #ffcccc !important; 
}

.theme-love .gen-sher.roman, 
.theme-love .gen-poet, 
.theme-love .gen-handle { 
    color: #ffcccc !important; 
    font-family: 'Great Vibes', cursive; 
    font-size: 1.4em; 
}

.theme-love .gen-sher.urdu { 
    color: #ffcccc !important; 
} 

.t-love { 
    background: #3e0707; 
}

.theme-street { 
    background-color: #121212; 
    background-image: repeating-linear-gradient(45deg, #1a1a1a 25%, transparent 25%, transparent 75%, #1a1a1a 75%, #1a1a1a), repeating-linear-gradient(45deg, #1a1a1a 25%, #121212 25%, #121212 75%, #1a1a1a 75%, #1a1a1a); 
    background-position: 0 0, 10px 10px; 
    background-size: 20px 20px; 
    color: #ffea00 !important; 
}

.theme-street .gen-sher.roman, 
.theme-street .gen-poet, 
.theme-street .gen-handle, 
.theme-street .gen-watermark { 
    color: #ffea00 !important; 
    font-family: 'Courier Prime', monospace; 
    text-shadow: 2px 2px 0px #ff0055; 
}

.theme-street .gen-sher.urdu { 
    color: #ffea00 !important; 
    text-shadow: 2px 2px 0px #ff0055; 
}

.theme-street .gen-watermark { 
    opacity: 0.8; 
}

.t-street { 
    background: #121212; 
    border-color: #ffea00; 
}

/* Sticky Nav / Profile / Extra */
.sticky-nav { 
    position: sticky; 
    top: 0; 
    background: rgba(255,255,255,0.95); 
    backdrop-filter: blur(10px); 
    padding: 15px 20px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    z-index: 100; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
}

[data-theme="dark"] .sticky-nav { 
    background: rgba(20,20,20,0.95); 
}

.script-bar { 
    text-align: center; 
    margin: 20px 0; 
}

.script-opt { 
    margin: 0 10px; 
    cursor: pointer; 
    opacity: 0.5; 
    font-size: 0.9rem; 
    text-transform: uppercase; 
}

.script-opt.active { 
    opacity: 1; 
    color: var(--maroon); 
    font-weight: bold; 
    border-bottom: 2px solid var(--maroon); 
}

#toast { 
    position: fixed; 
    bottom: 90px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: #222; 
    color: #fff; 
    padding: 10px 25px; 
    border-radius: 50px; 
    display: none; 
    z-index: 2000; 
}

#feed-view { 
    display: none; 
}

.profile-header { 
    text-align: center; 
    padding: 40px 20px; 
    background: var(--card-bg); 
    border-radius: 20px; 
    margin-bottom: 30px; 
    box-shadow: 0 10px 30px var(--shadow); 
    border: 1px solid var(--gold); 
}

.profile-img { 
    width: 100px; 
    height: 100px; 
    border-radius: 50%; 
    background: #ddd; 
    margin: 0 auto 15px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 2rem; 
    color: #888; 
    border: 3px solid var(--gold); 
}

.profile-name { 
    margin: 5px 0; 
}

.profile-era { 
    font-size: 0.9rem; 
    opacity: 0.7; 
    margin-bottom: 10px; 
}

.profile-bio { 
    font-size: 0.9rem; 
    font-family: 'Lato'; 
}

.load-more-btn { 
    margin: 20px auto 0; 
    display: block; 
    padding: 10px 25px; 
    border-radius: 30px; 
    border: 1px solid var(--gold); 
    background: transparent; 
    cursor: pointer; 
    font-family: 'Lato'; 
    font-size: 0.9rem; 
}

.load-more-btn:hover { 
    background: var(--gold); 
    color: #fff; 
}

@media (max-width: 480px) { 
    .diwan-title { 
        font-size: 2.1rem; 
    } 
    .ghazal-card { 
        padding: 25px; 
    } 
}

.library-nav { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    margin: 30px 0; 
}

.full-width-card { 
    grid-column: span 2; 
}

.lib-card { 
    min-width: auto; 
    padding: 20px 10px; 
    border-radius: 12px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    color: #fff; 
    border: 1px solid rgba(255,255,255,0.2); 
    position: relative; 
    overflow: hidden; 
}

.lib-card i { 
    font-size: 1.8rem; 
    margin-bottom: 10px; 
    opacity: 0.9; 
}

.lib-title { 
    font-family: 'Cinzel Decorative', cursive; 
    font-weight: bold; 
    font-size: 1rem; 
    margin-bottom: 2px; 
}

.lib-sub { 
    font-family: 'Lato', sans-serif; 
    font-size: 0.7rem; 
    opacity: 0.8; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

.ghazal-lib { 
    background: linear-gradient(135deg, #2c3e50, #4ca1af); 
}

.sher-lib { 
    background: linear-gradient(135deg, #630000, #a044ff); 
}

.shuffle-lib { 
    background: linear-gradient(135deg, #FF512F, #DD2476); 
}

.diary-lib { 
    background: linear-gradient(135deg, #2b5876, #4e4376); 
}

.submit-lib { 
    background: linear-gradient(135deg, #11998e, #38ef7d); 
}

.lib-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.3); 
}

.lib-card:active { 
    transform: scale(0.95); 
}

@media (max-width: 768px) {
    .top-bar { 
        position: static; 
        margin: 10px auto 0; 
        justify-content: center; 
        gap: 10px; 
        z-index: 20; 
    }
    .icon-btn { 
        width: 34px; 
        height: 34px; 
        box-shadow: 0 2px 6px rgba(0,0,0,0.15); 
    }
    .section-label { 
        margin: 32px 0 16px; 
    } 
    header { 
        padding: 30px 16px 24px; 
    }
    .diwan-title { 
        font-size: 2.2rem; 
        letter-spacing: 0.08em; 
    } 
    .section-label span { 
        font-size: 1.1rem; 
    }
    .ghazal-tile { 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        gap: 8px; 
        flex-wrap: wrap; 
    }
    .ghazal-tile-title { 
        flex: 1 1 60%; 
    } 
    .ghazal-tile-poet { 
        flex: 0 0 auto; 
        margin-left: 4px; 
        text-align: right; 
        white-space: nowrap; 
    }
}

@media (max-width: 480px) { 
    .ghazal-tile-title { 
        font-size: 0.9rem; 
    } 
    .ghazal-tile-poet { 
        font-size: 0.8rem; 
        margin-top: 2px; 
    } 
}

/* SCROLL REVEAL & ZEN MODE */
.reveal-item { 
    opacity: 0; 
    transform: translateY(40px) scale(0.95); 
    transition: all 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); 
    will-change: transform, opacity; 
}

.reveal-visible { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
}

#zen-mode { 
    position: fixed; 
    inset: 0; 
    background: var(--paper); 
    z-index: 5000; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    padding: 40px; 
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.5s ease; 
}

#zen-mode.active { 
    opacity: 1; 
    pointer-events: all; 
}

#zen-content { 
    max-width: 600px; 
    width: 100%; 
    transform: translateY(20px); 
    transition: transform 0.8s ease 0.2s; 
}

#zen-mode.active #zen-content { 
    transform: translateY(0); 
}

.zen-sher { 
    font-family: 'Noto Nastaliq Urdu', serif; 
    font-size: calc(2.5rem * var(--font-scale)); 
    line-height: 2.2; 
    color: var(--ink); 
    margin-bottom: 30px; 
    text-shadow: 0 5px 15px rgba(0,0,0,0.05); 
}

.zen-poet { 
    font-family: 'Playfair Display', serif; 
    font-size: 1.2rem; 
    color: var(--maroon); 
    font-style: italic; 
    position: relative; 
    display: inline-block; 
}

.zen-poet::before, .zen-poet::after { 
    content: '〰'; 
    color: var(--gold); 
    margin: 0 15px; 
    vertical-align: middle; 
}

.zen-controls { 
    position: absolute; 
    bottom: 50px; 
    display: flex; 
    gap: 30px; 
}

.zen-btn { 
    background: none; 
    border: 1px solid var(--ink); 
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    font-size: 1.2rem; 
    cursor: pointer; 
    color: var(--ink); 
    transition: 0.3s; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.zen-btn:hover { 
    background: var(--maroon); 
    color: #fff; 
    border-color: var(--maroon); 
    transform: scale(1.1); 
}

/* SUBMISSION MODAL */
.submission-box { 
    width: 90%; 
    max-width: 500px; 
    background: #fff; 
    border-radius: 12px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    max-height: 90vh; 
}

.submission-body { 
    padding: 25px; 
    overflow-y: auto; 
}

.input-group { 
    margin-bottom: 20px; 
}

.input-group label { 
    display: block; 
    font-size: 0.9rem; 
    font-weight: bold; 
    color: var(--maroon); 
    margin-bottom: 8px; 
    font-family: 'Lato', sans-serif; 
}

.input-group input, .input-group textarea { 
    width: 100%; 
    padding: 12px; 
    border: 2px solid #eee; 
    border-radius: 8px; 
    font-family: 'Lato', sans-serif; 
    font-size: 1rem; 
    transition: 0.3s; 
    background: #f9f9f9; 
    box-sizing: border-box; 
}

.font-toggles { 
    display: flex; 
    gap: 10px; 
}

.font-opt { 
    font-size: 0.7rem; 
    padding: 2px 8px; 
    border: 1px solid #ddd; 
    border-radius: 10px; 
    cursor: pointer; 
    background: #fff; 
    color: #666; 
    transition: 0.2s; 
}

.font-opt.active { 
    background: var(--maroon); 
    color: #fff; 
    border-color: var(--maroon); 
}

.input-group input:focus, .input-group textarea:focus { 
    border-color: var(--gold); 
    background: #fff; 
    outline: none; 
}

.submission-body .btn-group { 
    display: flex; 
    gap: 10px; 
}

[data-theme="dark"] .submission-box { 
    background: var(--card-bg); 
}

[data-theme="dark"] .input-group input, 
[data-theme="dark"] .input-group textarea { 
    background: #2a2a2a; 
    border-color: #444; 
    color: #fff; 
}

[data-theme="dark"] .studio-header h3 { 
    color: #fff; 
}

[data-theme="dark"] .font-opt { 
    background: #333; 
    border-color: #555; 
    color: #ddd; 
}

[data-theme="dark"] .font-opt.active { 
    background: var(--maroon); 
    color:#fff; 
}

#dedication-overlay { 
    backdrop-filter: blur(10px); 
    transition: opacity 0.5s; 
}

/* DAILY PICKS & UPI */
.daily-pick-card { 
    background: linear-gradient(135deg, var(--card-bg), var(--paper)); 
    border: 1px solid rgba(184, 134, 11, 0.3); 
    border-radius: 12px; 
    padding: 20px; 
    margin-bottom: 15px; 
    display: flex; 
    align-items: center; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    position: relative; 
    overflow: hidden; 
}

.daily-pick-card::before { 
    content: ''; 
    position: absolute; 
    left: 0; 
    top: 0; 
    height: 100%; 
    width: 4px; 
    background: var(--gold); 
    transition: 0.3s; 
}

.daily-pick-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(184, 134, 11, 0.15); 
    border-color: var(--gold); 
}

.daily-pick-card:hover::before { 
    width: 8px; 
    background: var(--maroon); 
}

.pick-icon { 
    font-size: 1.8rem; 
    color: var(--gold); 
    margin-right: 20px; 
    width: 40px; 
    text-align: center; 
}

.pick-content { 
    flex: 1; 
}

.pick-title { 
    font-family: 'Cinzel Decorative', cursive; 
    font-weight: bold; 
    font-size: 1.2rem; 
    color: var(--maroon); 
    margin-bottom: 5px; 
}

.pick-desc { 
    font-family: 'Lato', sans-serif; 
    font-size: 0.85rem; 
    color: #888; 
}

.pick-arrow { 
    color: #ccc; 
    transition: 0.3s; 
}

.daily-pick-card:hover .pick-arrow { 
    color: var(--maroon); 
    transform: translateX(5px); 
}

.upi-display-box { 
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.05), rgba(99, 0, 0, 0.02)); 
    border: 2px dashed var(--gold); 
    border-radius: 12px; 
    padding: 30px 15px 20px; 
    margin: 20px 0 30px 0; 
    position: relative; 
    transition: all 0.3s ease; 
}

.upi-display-box:hover { 
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.1), rgba(99, 0, 0, 0.05)); 
    border-style: solid; 
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.15); 
    transform: translateY(-2px); 
}

.upi-icon { 
    font-size: 2rem; 
    color: var(--maroon); 
    margin-bottom: 12px; 
    display: flex; 
    justify-content: center; 
    gap: 15px; 
    opacity: 0.8; 
}

.upi-id-text { 
    font-family: 'Courier Prime', monospace; 
    font-size: 1.2rem; 
    font-weight: bold; 
    color: var(--maroon); 
    margin: 0; 
    letter-spacing: 0.5px; 
}

[data-theme="dark"] .upi-id-text { 
    color: var(--gold); 
}

.upi-label { 
    position: absolute; 
    top: -12px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: var(--gold); 
    color: #fff; 
    padding: 4px 15px; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    font-family: 'Lato', sans-serif; 
    font-weight: bold; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    white-space: nowrap; 
}

/* TABSARAH */
.comment-bubble { 
    background: #f5f5f5; 
    padding: 10px 15px; 
    border-radius: 12px; 
    margin-bottom: 10px; 
    border-left: 3px solid var(--gold); 
    font-family: 'Lato', sans-serif; 
}

[data-theme="dark"] .comment-bubble { 
    background: #2a2a2a; 
    color: #ddd; 
}

.comment-bubble strong { 
    color: var(--maroon); 
    font-size: 0.85rem; 
    display: block; 
    margin-bottom: 4px; 
}

[data-theme="dark"] .comment-bubble strong { 
    color: var(--gold); 
}

.comment-bubble p { 
    margin: 0; 
    font-size: 0.95rem; 
    line-height: 1.4; 
    color: var(--ink); 
}

[data-theme="dark"] .comment-bubble p { 
    color: #eee; 
}

.live-badge { 
    font-size: 0.65rem; 
    background: rgba(255, 0, 0, 0.1); 
    color: red; 
    padding: 3px 8px; 
    border-radius: 12px; 
    margin-left: 10px; 
    vertical-align: middle; 
    animation: pulseLive 1.5s infinite; 
    font-family: 'Lato', sans-serif; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

@keyframes pulseLive { 
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); } 
    70% { box-shadow: 0 0 0 8px rgba(255, 0, 0, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); } 
}

/* =========================================
   MOBILE FIXES & REFINEMENTS (ADD AT BOTTOM)
   ========================================= */

/* 1. Taj-e-Sukhan Background Fix (Removing harsh white) */
.royal-card { 
    background: linear-gradient(145deg, var(--card-bg), var(--paper)); 
}

@media (max-width: 480px) { 
    
    /* 1. Title Fix */
    .diwan-title { 
        font-size: 1.75rem !important; 
        letter-spacing: 0.05em; 
    } 
    
    /* 2. Sher of the Moment Fix (Wah button upar, icons ek line mein neeche) */
    #moment-card > div:last-child {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 25px !important; /* Icons ke beech ka gap */
    }
    #moment-card .wah-btn {
        flex: 0 0 100%; /* Button ko apni alag line dene ke liye */
        max-width: 160px;
        margin: 0 auto 10px auto !important;
    }

    /* 3. Feed Cards Fix (Regular feed ko bhi clean banane ke liye) */
    .card-footer {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        padding-top: 15px;
    }
    .card-footer .wah-btn {
        flex: 0 0 100%;
        max-width: 160px;
        margin: 0 auto 15px auto !important;
    }
    .actions {
        width: 100%;
        justify-content: center !important;
        gap: 25px !important; 
        flex-direction: row !important; /* Icons ek horizontal line mein */
    }

    /* 4. Taj-e-Sukhan Share Button Gap Fix */
    .royal-footer {
        justify-content: center !important;
        gap: 15px !important; /* Wah aur Share ko qareeb lane ke liye */
        padding-top: 15px;
    }
    .royal-footer .wah-btn {
        flex: 0 0 auto !important; /* Yeh normal behavior show karega */
        margin: 0 !important;
        min-width: 130px;
    }

    /* 5. Aaj Ke Picks Gap Reduce */
    .daily-pick-card {
        margin-bottom: 10px !important; /* Gap kam kar diya */
        padding: 12px 15px !important; /* Box ko thoda compact banaya */
    }
    .pick-icon {
        font-size: 1.5rem;
        margin-right: 15px;
    }
    .pick-title {
        font-size: 1.05rem;
    }
    .pick-desc {
        font-size: 0.75rem;
    }

    /* 6. Poet Profiles Grid (3 Shayar ek line mein) */
    .poet-grid {
        grid-template-columns: repeat(3, 1fr) !important; 
        gap: 10px !important;
    }
    .poet-tile {
        padding: 12px 5px !important;
    }
    .poet-tile i {
        font-size: 1.3rem; /* 3 column ke hisaab se icon chota kiya */
    }
    .poet-name {
        font-size: 0.7rem !important; 
        word-wrap: break-word;
    }

    /* Universal Wah button shape for mobile */
    .wah-btn {
        border-radius: 30px; 
        padding: 10px 25px !important;
    }
}