* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ****************************** index.html ****************************** */

.content {
    padding: clamp(12px, 4vw, 20px);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 15px);
    flex: 1;
}

.menu-card {
    background: #f7fafc;
    padding: clamp(16px, 4vw, 20px);
    border-radius: clamp(10px, 3vw, 15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.menu-icon {
    font-size: clamp(28px, 7vw, 35px);
    flex-shrink: 0;
}

.menu-text {
    flex: 1;
}

.menu-title {
    font-size: clamp(17px, 5vw, 20px);
    font-weight: 600;
    color: var(--primary);
    transition: color 0.3s ease;
}

.menu-desc {
    font-size: clamp(12px, 3.5vw, 14px);
    margin-top: clamp(4px, 1vw, 6px);
    color: #718096;
}

.menu-badge {
    position: static;
    left: clamp(12px, 3vw, 16px);
    top: clamp(12px, 3vw, 16px);
    background: var(--menu-badge);
    color: white;
    font-size: clamp(10px, 2.5vw, 12px);
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: clamp(3px, 1vw, 4px) clamp(8px, 2vw, 10px);
    border-radius: clamp(8px, 2vw, 10px);
    box-shadow: 0 2px 8px var(--menu-badge-shadow);
}

.account-view {
    display: none;
    padding: clamp(5px, 5vw, 15px) clamp(10px, 5vw, 20px);
    direction: rtl;
}
.account-view.active {
    display: block;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group input {
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    direction: ltr;
    text-align: right;
    outline: none;
    background: #f7fafc;
    letter-spacing: 3px !important;
    margin-bottom: 10px;
}

.input-group input:focus {
    border-color: var(--primary, #667eea);
    background: white;
}

.input-group input::placeholder {
    color: #a0aec0;
    direction: rtl;
    letter-spacing: normal;
}

.input-group button {
    position: absolute;
    left: 12px;
    top: 50%;transform:translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding-top: 3px;
}

.btn-login {
    padding: clamp(8px, 2vw, 10px);
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 30px;
}

.login-error {
    color: #c53030;
    border-radius: 8px;
    font-size: clamp(12px, 5vw, 13px);
    text-align: center;
    display: none;
}

.login-error.show { 
    display: block; 
}

.login-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.purchase-section {
    margin-top: 0px;
}

.purchase-title {
    font-size: clamp(13px, 2vw, 14px);
    color: #4a5568;
    text-align: center;
    margin-bottom: 6px;
    font-weight: 600;
}

.purchase-buttons {
    display: flex;
    gap: 10px;
}

.btn-subscription {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 2vw, 10px);
    border-radius: 10px;
    font-size: clamp(13px, 2vw, 14px);
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid #9ae6b4;
    background: #f0fff4;
    color: #2f855a;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
    flex: 1;
}

/* Logged-in Profile */
.profile-card {
    background: var(--gradient);
    border-radius: 16px;
    padding: 20px 24px;
    color: white;
    text-align: right;
    margin-bottom: 20px;
}

.profile-card .label {
    font-size: clamp(12px, 2vw, 14px);
    opacity: 0.9;
    margin-bottom: clamp(5px, 2vw, 10px);
    font-weight: bold;
}

.profile-card .value {
    font-size: clamp(16px, 2vw, 18px);
    font-weight: bold;
    text-align: center;
}

.profile-card .value .code {
    letter-spacing: 3px !important;
}

.profile-card hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.3);
    margin: clamp(15px, 2vw, 20px) 0px;
}

.days {
    background: rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: clamp(5px, 1vw, 6px) clamp(12px, 2vw, 14px);
    font-size: clamp(13px, 2vw, 15px) !important;
}

.profile-actions {
    display: flex;
    flex-direction: column;
}

.profile-links {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    justify-content: center;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 2vw, 10px);
    border-radius: 10px;
    font-size: clamp(13px, 2vw, 14px);
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #4a5568;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
    background: #fff5f5;
    border-color: #f2bfbf;
    color: #c53030;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

.socials-section {
    margin-top: 40px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}

.socials-title {
    font-size: clamp(13px, 2vw, 14px);
    color: #4a5568;
    text-align: center;
    font-weight: 600;
}

.socials-buttons {
    display: flex;
}

.socials-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    cursor: pointer;
    background: #fff;
    text-decoration: none;
    flex: 1;
    position: relative;
    transition: background 0.25s ease, transform 0.2s ease;
}

.socials-link-btn img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

/* Loading Animation */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(40px, 10vw, 60px);
    gap: clamp(15px, 4vw, 20px);
}

.loading-spinner {
    width: clamp(40px, 10vw, 50px);
    height: clamp(40px, 10vw, 50px);
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container p {
    font-size: clamp(14px, 4vw, 16px);
    color: #718096;
    text-align: center;
}

.page-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}

.page-loading-overlay.active {
    display: flex;
    pointer-events: all;
}

.page-loading-overlay .loading-container {
    text-align: center;
}

.page-loading-overlay .loading-container p {
    font-size: clamp(14px, 4vw, 16px);
    color: #e2e8f0;
    text-align: center;
}


/* ****************************** rules.html ****************************** */

.rules-content {
    margin: 0 auto;
}

.rules-section {
    background: var(--card-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.1));
    border-radius: 14px;
    padding: 10px 12px;
    text-align: justify;
    text-justify: inter-word;
}

.rules-section h2 {
    font-size: 17px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rules-section p,
.rules-section li {
    font-size: 14px;
    line-height: 1.9;
    color: #4a5568;
}

.rules-section ul {
    padding-inline-start: 20px;
    margin-top: 6px;
}

.rules-updated {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted, #718096);
    margin-top: 24px;
}


/* ****************************** purchase.html ****************************** */

/* ── Purchase page extras ── */
.content-2 {
    justify-content: center;
}

.purchase-page {
    padding: clamp(8px, 2vw, 12px);
}

.purchase-intro {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-secondary, #718096);
    font-size: clamp(16px, 2vw, 17px);
    line-height: 1.7;
}

.plans-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: clamp(18px, 3vw, 21px) 21px;
    background: var(--card-bg, #fff);
    border: 1.5px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.plan-row.has-discount {
    border-color: #f6ad55;
}

.discount-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 0 0 10px 0;
    line-height: 1.4;
}

.plan-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.plan-title {
    font-size: clamp(15px, 2vw, 16px);
    font-weight: 700;
    color: var(--text-primary, #2d3748);
}

.plan-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.plan-price-old {
    font-size: clamp(13px, 2vw, 14px);
    color: #a0aec0;
    text-decoration: line-through;
}

.plan-price-final {
    font-size: clamp(16px, 2vw, 17px);
    font-weight: 800;
    color: var(--primary, #d53f8c);
}

.plan-price-final .currency {
    font-size: 12px;
    font-weight: 500;
    margin-right: 3px;
}

.btn-pay {
    flex-shrink: 0;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: clamp(4px, 1vw, 6px) clamp(12px, 2vw, 18px);
    font-size: clamp(13px, 2vw, 14px);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
}

/* ── Payment modal (compact guide) ── */
#paymentModal .modal-content {
    max-width: 400px;
    max-height: 1000px;
    width: min(94vw, 400px);
}

.pay-modal-body {
    padding: 0 2px 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pay-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
    border-radius: 12px;
    padding: 12px 14px;
}

.pay-summary-plan {
    font-size: 13px;
    color: #718096;
    margin-bottom: 2px;
    font-weight: 500;
}

.pay-summary-title {
    font-size: 15px;
    font-weight: 700;
    color: #d53f8c;
}

.pay-summary-amount {
    text-align: left;
    flex-shrink: 0;
}

.pay-summary-amount .label {
    font-size: 11px;
    color: #718096;
    margin-bottom: 2px;
    font-weight: 500;
}

.pay-summary-amount .value {
    font-size: 18px;
    font-weight: 800;
    color: #d53f8c;
    white-space: nowrap;
}

.pay-summary-amount .value .currency {
    font-size: 12px;
    font-weight: 500;
    margin-right: 2px;
}

.pay-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pay-step {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    padding: 12px;
}

.pay-step-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gradient, linear-gradient(135deg, #d53f8c, #ed64a6));
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-top: 1px;
}

.pay-step-body {
    flex: 1;
    min-width: 0;
}

.pay-step-title {
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
    line-height: 1.5;
}

.pay-step-title span.hint {
    font-weight: 500;
    color: #718096;
    font-size: 12px;
}

.card-number-row {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: ltr;
    background: #fff;
    border: 1.5px dashed #cbd5e0;
    border-radius: 10px;
    padding: 8px 10px;
}

.card-number {
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
    font-family: 'Courier New', monospace;
    flex: 1;
    text-align: center;
    user-select: all;
    letter-spacing: 0.3px;
}

.btn-copy {
    background: #edf2f7;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    color: #4a5568;
    white-space: nowrap;
    transition: background;
    flex-shrink: 0;
    min-width: 37px;
}

.btn-copy.copied {
    background: #c6f6d5;
    border-color: #68d391;
    color: #276749;
}

.card-holder {
    margin-top: 8px;
    font-size: 12px;
    color: #718096;
    text-align: center;
}

.card-holder strong {
    color: #2d3748;
}

.receipt-links {
    display: flex;
    gap: 8px;
}

.receipt-links .link-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 10px;
    background: #fff;
    color: #2d3748;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.receipt-links .link-btn:active {
    transform: scale(0.98);
}

.receipt-links .link-btn img {
    width: 20px;
    height: 20px;
}

.terms-notice {
    text-align: center;
    font-size: clamp(12px, 3vw, 13px);;
    color: #4a5568;
    line-height: 1.8;
    font-weight: 500;
    background: #fffbeb;
    border: 1px solid #f6e05e;
    border-radius: 10px;
    padding: 8px 10px;
    line-height: 1.6;
}

.terms-notice a {
    color: var(--accent-color, #667eea);
    text-decoration: none;
}

/* Error Message */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(40px, 10vw, 60px);
    gap: clamp(15px, 4vw, 20px);
}

.error-message p {
    padding:5px;
    font-size: clamp(14px, 4vw, 16px);
    color: #e53e3e;
    text-align: center;
}

.error-message button {
    background: var(--gradient);
    color: white;
    border: none;
    display: block;
    margin: 0 auto;
    padding: clamp(10px, 3vw, 12px) clamp(20px, 5vw, 24px);
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 600;
    border-radius: clamp(8px, 2.5vw, 10px);
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow);
}

.rules-box {
    margin-top: 30px;
    padding: 10px 12px;
    background: var(--card-bg, #fff);
    border: 1.55px solid var(--border-color, #e2e8f0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    color: #475569;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.6;
    text-align: justify;
    text-justify: inter-word;
}

.rules-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rules-box li {
    position: relative;
    padding-right: 20px;
    margin-bottom: 4px;
    font-size: clamp(12px, 2vw, 13px);
    line-height: 1.9;
    color: #475569;
}

.rules-box li:last-child {
    margin-bottom: 0;
}

.rules-box li::before {
    content: "✓";
    position: absolute;
    right: 0;
    top: 0;
    color: #22c55e;
    font-size: clamp(15px, 2vw, 16px);
    font-weight: 700;
    margin-top: -2.85px;
}

#purchaseIntro,
#rulesBox {
    display: none;
}

#purchaseIntro.show,
#rulesBox.show {
    display: block;
}