:root {
    --royal-obsidian: #08080a;
    --burnt-orange: #f97316;
    --royal-gold: #D4AF37;
    --text-main: #ecf0f1;
    --text-muted: #94a3b8;
    
    /* Mapping for existing logic to Royal Theme */
    --primary-green: #f97316; /* Burnt Orange as Primary Action */
    --light-green: #fb923c;
    --accent-green: #fdba74;
    --background: #08080a;
    --white: #111114; /* Dark Card Background */
    --secondary-bg: #18181b;
    --gold: #D4AF37;
    --text-dark: #ecf0f1;
    --text-gray: #94a3b8;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(17, 17, 20, 0.7);
    --glass-border: rgba(249, 115, 22, 0.1);
}

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

body {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    direction: rtl;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    color: var(--text-main);
}

/* Header */
.main-header {
    background: rgba(8, 8, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 48px;
    width: auto;
}

.time-section {
    text-align: center;
    background: var(--secondary-bg);
    padding: 0.5rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
}

.hijri-date {
    color: var(--burnt-orange);
    font-weight: bold;
    font-size: 1.1rem;
}

.gregorian-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.prayer-countdown {
    font-size: 0.85rem;
    color: var(--gold);
    margin-top: 0.25rem;
}

.auth-buttons .btn {
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.btn-login {
    color: var(--burnt-orange);
    background: transparent;
    border: 1px solid var(--burnt-orange);
}

.btn-register {
    background: var(--burnt-orange);
    color: #fff;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
}

/* Ads Section */
.ads-section {
    padding: 3rem 0;
    max-width: 1280px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    color: var(--burnt-orange);
    margin-bottom: 2rem;
    font-size: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 0.5rem auto;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    background: var(--white);
    box-shadow: var(--shadow-md);
    min-height: 300px;
    border: 1px solid var(--glass-border);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.ad-card {
    min-width: 100%;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(17,17,20,0.9), rgba(8,8,10,0.8));
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.ad-card h3 {
    color: var(--burnt-orange);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.ad-card p {
    color: var(--text-muted);
}

/* Candles Section */
.candles-section {
    background: linear-gradient(180deg, #1a1a1a, #08080a);
    padding: 4rem 0;
    color: var(--text-main);
    text-align: center;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.candle-icon {
    font-size: 3rem;
    margin: 1rem 0;
    animation: float 3s ease-in-out infinite;
    text-shadow: 0 0 20px var(--burnt-orange);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1280px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--gold);
    border: 1px solid var(--glass-border);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--burnt-orange);
    font-family: 'Cairo', sans-serif;
}

.stat-label {
    color: var(--text-muted);
}

/* Footer */
.main-footer {
    background: #000000;
    color: var(--text-muted);
    padding: 4rem 0 1rem;
    margin-top: 4rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding: 0 1rem;
}

.footer-col h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
}