:root {
    --primary-color: #6a0572;
    --secondary-color: #aa4e9c;
    --light-gray: #ccc;
    --dark-green: #28a745;
    --red-color: #dc3545;
    --background-blue: #0C2742;
    --font-family: 'Cairo', sans-serif;
    --card-bg-light: #fdfdfd;
    --card-border-light: #eee;
    --timeline-line: #ddd;
    --timeline-dot: #6a0572;
    --ended-ribbon-bg: #888;
    --footer-icon-color: #ffffff;
    --disabled-button-bg: #a9a9a9;
    --disabled-button-color: #e0e0e0;
    --share-button-color: #007bff;
}

html, body {
    height: 100%; margin: 0; padding: 0; padding-top: 0px;
    box-sizing: border-box; overflow-x: hidden;
}

body {
    font-family: var(--font-family); background-color: #f9f9f9;
    color: #333; direction: rtl; text-align: right;
    line-height: 1.6; padding-bottom: 70px;
}

.container {
    max-width: 900px; margin: 0 auto 30px auto; padding: 20px;
    background-color: #fff; border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); position: relative;
}

.interaction-overlay, #install-feedback-overlay {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.8); color: white;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 10000; text-align: center; padding: 20px; box-sizing: border-box;
    opacity: 1; transition: opacity 0.5s ease-out;
}

.interaction-overlay { cursor: pointer; }
.interaction-overlay.hidden { opacity: 0; pointer-events: none; }
.interaction-overlay .message { margin-bottom: 20px; font-size: 1.5em; line-height: 1.3; }
.interaction-overlay .sub-message { font-size: 0.9em; margin-top: 10px; opacity: 0.8; }
.interaction-overlay .hand-icon { font-size: 3em; animation: bounce 1s infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-15px); } }

#install-feedback-overlay {
    background-color: rgba(0, 0, 0, 0.6);
}
#install-feedback-overlay .content-box {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px; border-radius: 15px;
    backdrop-filter: blur(5px);
}
#install-feedback-overlay .message { font-size: 1.3em; margin-top: 15px; }
#install-feedback-overlay .sub-message { font-size: 0.9em; max-width: 280px; }

.spinner-container { width: 60px; height: 60px; position: relative; }
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3); border-radius: 50%;
    border-top-color: #fff; width: 100%; height: 100%;
    animation: spin 1s linear infinite; box-sizing: border-box;
    position: absolute; top: 0; left: 0;
}
.checkmark {
    font-size: 40px; color: #28a745;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease-in-out;
}
.checkmark.visible { transform: translate(-50%, -50%) scale(1); }
@keyframes spin { 100% { transform: rotate(360deg); } }

.confetti-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; z-index: 1; }
.confetti { position: absolute; width: 8px; height: 8px; background-color: #ffd700; opacity: 0.7; border-radius: 50%; animation: fall linear infinite; }
@keyframes fall { 0% { transform: translateY(-100px); } 100% { transform: translateY(100vh); } }

.header {
    text-align: center;
    padding: 10px 15px 15px 15px;
    border-bottom: 2px solid var(--primary-color);
    position: fixed; top: 0; left: 0; width: 100%;
    background-color: #fff; z-index: 102;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header h1 {
    color: var(--primary-color); font-size: 2em;
    margin: 5px 0 10px 0; font-weight: 700;
}

.header p { 
    color: #666; font-size: 1.0em; margin: 0 auto 15px auto; 
    max-width: 90%;
}

@media (max-width: 400px) { .header h1 { font-size: 1.7em; } }

.header-buttons-container { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 10px; }
.header-btn {
    display: inline-flex; align-items: center; justify-content: center;
    color: white; padding: 8px 15px; border-radius: 20px;
    text-decoration: none; font-size: 0.9em; font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}
.header-btn i { margin-left: 8px; }
.header-btn:hover { transform: translateY(-2px); }
.whatsapp-share-btn { background-color: #25D366; }
#installAppButton { background-color: var(--primary-color); }

.events-timeline { position: relative; padding: 20px 0; margin-top: 0px; }
.events-timeline::before { content: ''; position: absolute; top: 0; left: 50%; width: 2px; height: 100%; background-color: var(--timeline-line); transform: translateX(-50%); z-index: 0; }
.event-card { background-color: var(--card-bg-light); border: 1px solid var(--card-border-light); border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); margin-bottom: 30px; padding: 20px; position: relative; z-index: 1; max-width: 45%; box-sizing: border-box; }
.event-card.today-card { border-color: var(--dark-green); box-shadow: 0 0 15px rgba(40, 167, 69, 0.5); animation: pulse-border 1.5s infinite alternate; }
@keyframes pulse-border { 0% { box-shadow: 0 0 15px rgba(40, 167, 69, 0.5); } 100% { box-shadow: 0 0 20px rgba(40, 167, 69, 0.8); } }
.ended-ribbon { position: absolute; top: 0px; left: 0px; background-color: var(--ended-ribbon-bg); color: white; padding: 5px 15px; font-size: 0.8em; font-weight: bold; border-top-left-radius: 8px; clip-path: polygon(0 0, 100% 0, 100% 80%, 0% 100%); z-index: 10; min-width: 100px; text-align: center; display: none; }
.event-card:nth-child(even) { margin-right: calc(50% + 15px); margin-left: 0; }
.event-card:nth-child(odd) { margin-left: calc(50% + 15px); margin-right: 0; }
.event-card::before { content: ''; position: absolute; top: 25px; width: 15px; height: 15px; background-color: var(--timeline-dot); border: 2px solid white; border-radius: 50%; z-index: 2; }
.event-card:nth-child(even)::before { right: -25px; }
.event-card:nth-child(odd)::before { left: -25px; }
.event-card .groom-name { font-size: 1.5em; color: var(--primary-color); margin-bottom: 10px; font-weight: 700; }
.event-card .date-info { font-size: 1em; color: #555; margin-bottom: 8px; border-bottom: 1px dashed var(--light-gray); padding-bottom: 5px; }
.event-card .hijri-date { display: block; font-size: 0.9em; color: #777; margin-top: 5px; }
.event-card .location { font-size: 0.95em; color: #666; margin-bottom: 15px; display: flex; align-items: center; }
.event-card .location i { margin-left: 8px; color: var(--secondary-color); }
.event-card .status-indicator { margin-top: 15px; font-weight: bold; min-height: 20px; }
.event-card .status-indicator .status-ended { color: var(--light-gray); }
.event-card .status-indicator .status-today { color: var(--dark-green); animation: blinker 1.5s linear infinite; }
@keyframes blinker { 50% { opacity: 0.3; } }
.event-card .status-indicator .status-countdown { color: var(--red-color); }

.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; margin-bottom: 15px; border-top: 1px dashed var(--light-gray); padding-top: 15px; }
.card-actions .action-btn { display: inline-flex; align-items: center; justify-content: center; background-color: var(--secondary-color); color: white; padding: 8px 15px; border-radius: 20px; text-decoration: none; font-size: 0.9em; transition: background-color 0.3s ease; flex-grow: 1; min-width: 120px; box-sizing: border-box; white-space: nowrap; }
.card-actions .action-btn i { margin-left: 8px; }
.card-actions .action-btn:hover:not(.disabled) { background-color: #8f3d82; }
.card-actions .whatsapp-btn-card { background-color: #25D366; }
.card-actions .share-btn-card { background-color: var(--share-button-color); }
.action-btn.disabled, .header-btn.disabled { background-color: var(--disabled-button-bg) !important; color: var(--disabled-button-color) !important; cursor: not-allowed; pointer-events: none; }

.footer-rights { text-align: left; margin-top: 50px; padding: 20px; background-color: var(--background-blue); color: white; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); display: flex; flex-direction: row; align-items: center; justify-content: flex-start; position: relative; flex-wrap: wrap; box-sizing: border-box; }
.footer-rights .profile-info-section { 
    display: flex; align-items: center; justify-content: flex-start; 
    width: 100%; margin-bottom: 15px; padding-bottom: 15px; 
    flex-wrap: wrap; 
}
.footer-rights .profile-image-footer { width: 90px; height: 90px; object-fit: cover; margin-right: 15px; flex-shrink: 0; box-shadow: 0 0 5px rgba(0,0,0,0.3); }
.footer-rights .bar-logo { width: 180px; height: auto; object-fit: contain; opacity: 0.9; }
.footer-rights .vertical-divider { width: 2px; background-color: rgba(255, 255, 255, 0.4); margin: 0 25px; height: 100px; flex-shrink: 0; }
.footer-rights .profile-text-content { flex-grow: 1; line-height: 1.6; min-width: 250px; text-align: left; }
.footer-rights .profile-text-content p { margin: 5px 0; padding: 0; font-size: 0.95em; }
.footer-rights .profile-text-content strong { color: var(--secondary-color); }
.footer-rights .profile-text-content a { color: #ffffff; text-decoration: none; transition: text-decoration 0.2s ease; }
.footer-rights .profile-text-content .icon-text { display: flex; align-items: center; justify-content: flex-start; }
.footer-rights .profile-text-content .icon-text i { margin-right: 8px; margin-left: 0; font-size: 1.1em; color: var(--footer-icon-color); }
.footer-rights .copyright-text { width: 100%; text-align: left; margin-top: 15px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.2); font-size: 0.85em; color: rgba(255, 255, 255, 0.7); }

.footer-rights .copyright-text a {
    color: #FFFFFF;
    text-decoration: underline;
}

.footer-marquee { background-color: var(--primary-color); color: white; padding: 15px 0; overflow: hidden; position: fixed; bottom: 0; left: 0; width: 100%; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); z-index: 101; }
.footer-marquee span { display: inline-block; white-space: nowrap; animation: scrollText 20s linear infinite; padding-left: 100%; }
@keyframes scrollText { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

@media (max-width: 768px) {
    html, body { padding-top: 150px; }
    .container { margin: 15px; padding: 15px; }
    .events-timeline::before { left: 20px; transform: translateX(0); }
    .event-card { max-width: calc(100% - 40px); margin-left: 40px; margin-right: 0; }
    .event-card:nth-child(even), .event-card:nth-child(odd) { margin-left: 40px; margin-right: 0; }
    .event-card::before { left: -20px; right: auto; }
    .footer-rights { flex-direction: column; align-items: flex-start; text-align: left; font-size: 0.9em; padding: 15px; }
    .footer-rights .profile-info-section { flex-direction: column; align-items: flex-start; text-align: left; }
    .footer-rights .profile-image-footer { width: 60px; height: 60px; margin-bottom: 10px; margin-left: 0; align-self: flex-start; }
    .footer-rights .logo-and-text { flex-direction: column; margin-left: 0; align-items: flex-start; margin-bottom: 15px; }
    .footer-rights .bar-logo { width: 150px; height: auto; margin: 0 0 10px 0; }
    .footer-rights .vertical-divider { display: none; }
    .footer-rights .profile-text-content { width: 100%; min-width: unset; text-align: left; margin-bottom: 15px; }
    .footer-rights .copyright-text { margin-top: 0; padding-top: 10px; text-align: left; }
}
