:root {
    --heavenly-blue-light: #e0f7fa;
    --heavenly-blue-dark: #b2ebf2;
    --primary-accent: #00bcd4;
    --dark-text: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600&display=swap');

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background: #f4f7f9;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* --- Subscription Page --- */
.subscription-page {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.sub-page-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
}

.sub-page-back-button {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #555;
}

.plans-slider-container {
    flex-grow: 1;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Hide scrollbar */
    align-items: center; /* Center plans vertically */
}

.plans-slider-container::-webkit-scrollbar {
    display: none;
}

.plan-section {
    width: 100%;
    flex-shrink: 0;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.plan-content-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    width: 90%;
    max-width: 400px;
    position: relative; /* Needed for the banner */
    overflow: hidden; /* To keep banner corners rounded */
}

.plan-content-card h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.plan-content-card .plan-price {
    font-size: 1.2rem;
    color: #777;
    margin-bottom: 30px;
}

.plan-content-card .plan-price strong {
    font-size: 2rem;
    color: var(--dark-text);
}

.plan-content-card ul {
    list-style: none;
    text-align: right;
    margin-bottom: 40px;
}

.plan-content-card ul li {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    align-items: center;
}

.plan-content-card ul li i {
    font-size: 1.5rem;
    color: var(--primary-accent);
}

.plan-content-card.pro h2 {
    color: #3a7bd5;
}

/* --- Golden Banner for Pro Plan --- */
.pro .most-popular-banner {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #ffd700, #f0c000);
    color: #4a3300;
    padding: 5px 25px;
    font-size: 0.9rem;
    font-weight: 600;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.plan-content-card.pro {
    padding-top: 70px; /* Make space for the banner */
}


.plan-content-card.ultra h2 {
    color: #8e44ad;
}

.sub-page-footer {
    padding: 20px;
    text-align: center;
}

.main-subscribe-button {
    background: var(--dark-text);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.main-subscribe-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.3);
}

/* --- Coming Soon Popup --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1200;
}

.popup-overlay.visible {
    display: flex;
}

.popup-content {
    background: linear-gradient(135deg, var(--heavenly-blue-light), var(--heavenly-blue-dark));
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s;
}

@keyframes slideIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.popup-content h3 {
    font-size: 1.4rem;
    color: var(--dark-text);
    margin-bottom: 15px;
}

.popup-content p {
    color: #555;
    margin-bottom: 25px;
    line-height: 1.6;
}

.popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.popup-button {
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.popup-button.primary {
    background: var(--dark-text);
    color: white;
}

.popup-button.primary:hover {
    background: #555;
}

.popup-button.secondary {
    background: rgba(255, 255, 255, 0.5);
    color: var(--dark-text);
}

.popup-button.secondary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* ===== Dark Mode Styles ===== */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e0e0e0;
}

body.dark-mode .sub-page-back-button {
    color: #e0e0e0;
}

body.dark-mode .plan-content-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .plan-content-card h2 {
    color: #e0e0e0;
}

body.dark-mode .plan-content-card .plan-price {
    color: #aaa;
}

body.dark-mode .plan-content-card .plan-price strong {
    color: #e0e0e0;
}

body.dark-mode .plan-content-card ul li {
    color: #ccc;
}

body.dark-mode .popup-content {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .popup-content h3 {
    color: #e0e0e0;
}

body.dark-mode .popup-content p {
    color: #aaa;
}

body.dark-mode .popup-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

body.dark-mode .popup-button.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}
