* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.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(10px, 3vw, 20px);;
    direction: rtl;
}
.account-view.active {
    display: block;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.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;
    font-family: inherit;
    direction: ltr;
    text-align: right;
    outline: none;
    background: #f7fafc;
    letter-spacing: 2px;
}

.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;
}

.btn-login {
    padding: 13px;
    background: var(--gradient, linear-gradient(135deg, #667eea, #764ba2));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 4px;
}

.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: 10px;
}

.purchase-title {
    font-size: clamp(13px, 3vw, 14px);
    color: #4a5568;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
}

.purchase-buttons {
    display: flex;
    gap: 6px;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 6px;
    border-radius: 10px;
    font-size: clamp(12px, 2vw, 13px);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #4a5568;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
    flex: 1;
}

.link-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Logged-in Profile */
.profile-card {
    background: var(--gradient);
    border-radius: 16px;
    padding: 24px;
    color: white;
    text-align: right;
    margin-bottom: 16px;
}

.profile-card .label {
    font-size: clamp(12px, 2vw, 14px);
    opacity: 0.9;
    margin-bottom: clamp(8px, 2vw, 12px);
    font-weight: bold;
}

.profile-card .value {
    font-size: clamp(16px, 2vw, 18px);
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
}

.profile-card hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.3);
    margin:20px 0px;
}

.days {
    background: rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: clamp(6px, 1vw, 7px) clamp(12px, 2vw, 14px);
    font-size: clamp(13px, 2vw, 15px) !important;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-links {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    justify-content: center;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    margin-top: 10px;
    border-radius: 10px;
    font-size: clamp(13px, 2vw, 14px);
    font-weight: 600;
    font-family: inherit;
    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: #fed7d7;
    color: #c53030;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

/* 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;
}