:root {
    --bg-primary: #2f1452; /* Base Color */
    --bg-darker: #1a0833;
    
    /* Clean and soft card styling */
    --card-bg: rgba(255, 255, 255, 0.04); 
    --card-border: rgba(255, 255, 255, 0.06);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    /* Very calm, static background */
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-darker) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: var(--text-primary);
    padding: 4rem 1.5rem;
    overflow-x: hidden;
    line-height: 1.8;
}

/* Custom Scrollbar - Soft */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.container {
    width: 100%;
    max-width: 900px;
}

/* 2. Calm Card Elegance */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: var(--shadow-soft);
    transition: transform 0.6s ease, opacity 0.6s ease;
    opacity: 1;
}

.card.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: -9999px;
    visibility: hidden;
    transform: translateY(20px);
}

/* Image Section - Framed & Elegant */
.image-wrapper {
    width: 100%;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem 1.5rem 2rem;
    position: relative;
    border-bottom: none;
}

.image-wrapper img {
    width: 100%;
    max-width: 360px; /* Controls the size to act as a portrait/logo */
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 28px;
    
    /* Elegant Frame Effect */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4), 
                0 0 0 1px rgba(255,255,255,0.05),
                inset 0 0 20px rgba(0,0,0,0.5); /* Inner shadow for depth */
                
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease;
}

.image-wrapper img:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 
                0 0 0 1px rgba(255,255,255,0.1),
                inset 0 0 20px rgba(0,0,0,0.5);
}

/* Content Section */
.content-wrapper {
    padding: 2rem 3.5rem 4rem 3.5rem;
}

/* (Removed dynamic title styling) */

/* Dynamically Injected HTML Formatting */
.html-content {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.html-content p {
    margin-bottom: 1.5rem;
    line-height: 2;
    font-weight: 400;
}

.html-content p:empty {
    display: none;
}

.html-content .s6, .html-content .bumpedFont15, .html-content strong {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.95;
    position: relative;
}

.html-content .s3 {
    text-align: center;
    color: var(--text-primary);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

/* 4. Minimalist Tables */
.html-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    overflow: hidden;
}

.html-content table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

.html-content table tr:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.html-content table tr:last-child {
    border-bottom: none;
}

.html-content table td {
    padding: 1.2rem 1.5rem;
    vertical-align: top;
    font-size: 1.05rem;
}

/* Table headers (first row) */
.html-content table tr:first-child {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.html-content table td p {
    margin: 0;
}

/* Skeleton Loader - Framed Version */
.skeleton {
    display: block;
}

.skeleton-img {
    width: 100%;
    max-width: 360px;
    height: 360px;
    margin: 4rem auto 1.5rem auto;
    border-radius: 28px;
    background: rgba(255,255,255,0.03);
    animation: pulse 2s infinite ease-in-out;
}

.skeleton-content {
    padding: 2rem 3.5rem 4rem 3.5rem;
}

.skeleton-title, .skeleton-text {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    animation: pulse 2s infinite ease-in-out;
}

.skeleton-title {
    height: 35px;
    width: 40%;
    margin: 0 auto 3rem auto;
}

.skeleton-text {
    height: 16px;
    width: 100%;
    margin-bottom: 1rem;
}

.skeleton-text.short { width: 65%; }
.mt-4 { margin-top: 2rem; }

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body { padding: 2rem 1rem; }
    .image-wrapper img { max-width: 280px; }
    .skeleton-img { max-width: 280px; height: 280px; }
    .content-wrapper, .skeleton-content { padding: 2rem 1.5rem; }
    .html-content table { display: block; overflow-x: auto; white-space: nowrap; }
    .html-content table td { white-space: normal; min-width: 150px; }
}
