/* Sihravemen Master Style Sheet - Optimized 2026 */
:root {
    --bg-dark: #0a0c10;
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --gold-dark: #aa8831;
    --text-primary: #e6e6e6;
    --text-secondary: #a0a5b0;
    --card-bg: rgba(18, 22, 32, 0.85);
    --border-gold: rgba(212, 175, 55, 0.25);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

body.cosmic-bg {
    background: radial-gradient(circle at 50% 20%, #161c28 0%, #0a0c10 100%);
    background-attachment: fixed;
}

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.site-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 15px 80px 15px;
}

.thematic-banner-box {
    text-align: center;
    margin-bottom: 25px;
}

.thematic-banner-box img {
    max-width: 140px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
}

.gilded-frame {
    background: var(--card-bg);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    padding: 35px 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    content-visibility: auto;
    contain-intrinsic-size: 1px 500px;
}

.article-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 20px;
}

.brand-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--gold);
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.article-actions-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.action-btn-small {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.action-btn-small:hover {
    background: var(--gold);
    color: #0a0c10;
}

.article-body p {
    font-family: 'Amiri', serif;
    font-size: 1.18rem;
    margin-bottom: 18px;
    text-align: justify;
    color: #dcdde1;
}

.kulliyat-section {
    margin-bottom: 40px;
    content-visibility: auto;
    contain-intrinsic-size: 1px 400px;
}

.kulliyat-section h2 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.35rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding-bottom: 8px;
    margin-bottom: 18px;
}

@media (max-width: 768px) {
    #starfield {
        display: none !important;
    }
    .brand-title {
        font-size: 1.5rem;
    }
    .gilded-frame {
        padding: 20px 15px;
    }
    .article-body p {
        font-size: 1.08rem;
    }
}

/* -----------------------------------------------------------------------------
   ANTI-LAG & FLUID RENDERING ENHANCEMENTS (2026)
   ----------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
    text-rendering: optimizeSpeed;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Off-screen rendering optimization: skips rendering off-screen sections until scroll */
.kulliyat-section, .res-card, .astro-card {
    content-visibility: auto;
    contain-intrinsic-size: 1px 350px;
    contain: layout style;
}

/* Instant tap response on mobile */
button, a, input {
    touch-action: manipulation;
}

/* AdSense CLS Protection: prevents layout jumps when ads render */
.ad-slot-wrapper {
    min-height: 250px;
    margin: 25px auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    contain: layout size;
}
