@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --bg-dark: #0a0c10;
    --bg-card: rgba(18, 22, 31, 0.85);
    --bg-card-border: rgba(255, 77, 77, 0.3);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent-red: #ff3b30;
    --accent-red-glow: rgba(255, 59, 48, 0.45);
    --accent-amber: #ff9500;
    --accent-amber-glow: rgba(255, 149, 0, 0.35);
    --accent-green: #34c759;
    --accent-blue: #0a84ff;
    --font-en: 'Outfit', -apple-system, sans-serif;
    --font-ar: 'Tajawal', sans-serif;
    --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-en);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 59, 48, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 149, 0, 0.08) 0%, transparent 40%),
        linear-gradient(180deg, #07080b 0%, #0d1017 100%);
}

body.rtl {
    font-family: var(--font-ar);
    direction: rtl;
}

/* Dynamic Ambient Glow */
.ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 59, 48, 0.18) 0%, rgba(0, 0, 0, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    animation: pulseGlow 6s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.25); opacity: 1; }
}

/* Header & Navbar */
.top-bar {
    width: 100%;
    max-width: 1200px;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.brand-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 59, 48, 0.18);
    border: 1px solid var(--accent-red);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red);
    box-shadow: 0 0 15px var(--accent-red-glow);
}

.controls-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-lang, .btn-dev-unlock {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-lang:hover, .btn-dev-unlock:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-dev-unlock {
    border-color: rgba(255, 149, 0, 0.4);
    color: var(--accent-amber);
}

.btn-dev-unlock:hover {
    background: rgba(255, 149, 0, 0.15);
    box-shadow: 0 0 20px var(--accent-amber-glow);
}

/* Main Container */
.main-wrapper {
    width: 100%;
    max-width: 920px;
    padding: 20px;
    z-index: 10;
    margin: auto 0;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--bg-card-border);
    border-radius: 28px;
    padding: 45px;
    box-shadow: var(--glass-shadow), inset 0 0 30px rgba(255, 59, 48, 0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-amber), var(--accent-red));
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Status Badge */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid rgba(255, 59, 48, 0.4);
    padding: 8px 22px;
    border-radius: 50px;
    color: var(--accent-red);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-red);
    animation: blinkDot 1.5s infinite;
}

@keyframes blinkDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.85); }
}

/* Main Headings */
.main-heading {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-description-box {
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.25);
    border-radius: 18px;
    padding: 22px 25px;
    margin-bottom: 30px;
    text-align: left;
}

body.rtl .sub-description-box {
    text-align: right;
}

.sub-description {
    font-size: 1.05rem;
    color: #e2e8f0;
    line-height: 1.7;
}

.sub-description strong {
    color: #ff6b6b;
}

/* Developer Contact Banner Box */
.developer-contact-banner {
    background: rgba(10, 132, 255, 0.1);
    border: 1px solid rgba(10, 132, 255, 0.3);
    border-radius: 18px;
    padding: 16px 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.dev-banner-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #93c5fd;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dev-phone-badge {
    background: #0a84ff;
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.dev-phone-badge:hover {
    background: #0071e3;
    box-shadow: 0 0 15px rgba(10, 132, 255, 0.4);
}

/* Invoice Grid Summary */
.invoice-summary-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    text-align: left;
}

body.rtl .invoice-summary-box {
    text-align: right;
}

.summary-item label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.summary-item .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.summary-item .value.highlight-red {
    color: var(--accent-red);
    font-size: 1.25rem;
}

/* Service Details Accordion/Toggle */
.details-toggle-btn {
    background: transparent;
    border: none;
    color: var(--accent-amber);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    transition: opacity 0.2s;
}

.details-toggle-btn:hover {
    opacity: 0.85;
}

.service-breakdown-list {
    display: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

body.rtl .service-breakdown-list {
    text-align: right;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-row strong {
    color: var(--accent-amber);
}

/* Action Buttons Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 10px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-whatsapp {
    background: #25d366;
    color: #000;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
}

.btn-call {
    background: var(--accent-blue);
    color: #fff;
    box-shadow: 0 8px 25px rgba(10, 132, 255, 0.3);
}

.btn-call:hover {
    background: #0071e3;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(10, 132, 255, 0.4);
}

.btn-proof {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-proof:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-3px);
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content-box {
    background: #12161f;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    padding: 35px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    text-align: center;
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

body.rtl .close-modal-btn {
    right: auto;
    left: 20px;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.modal-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

body.rtl .form-group {
    text-align: right;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--accent-blue);
}

.pin-input {
    letter-spacing: 6px;
    font-size: 1.5rem;
    text-align: center;
    font-weight: 800;
}

.btn-submit-modal {
    width: 100%;
    padding: 16px;
    background: var(--accent-green);
    color: #000;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit-modal:hover {
    background: #2cb44f;
    box-shadow: 0 8px 20px rgba(52, 199, 89, 0.3);
}

.btn-unlock-modal {
    background: var(--accent-amber);
}

.btn-unlock-modal:hover {
    background: #e08300;
    box-shadow: 0 8px 20px rgba(255, 149, 0, 0.3);
}

/* Success Unlock Overlay */
.unlock-success-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #05180c;
    z-index: 2000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
}

.unlock-success-screen.active {
    display: flex;
    animation: zoomIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.success-icon-ring {
    width: 90px;
    height: 90px;
    background: rgba(52, 199, 89, 0.15);
    border: 2px solid var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-green);
    font-size: 2.8rem;
    margin-bottom: 25px;
    box-shadow: 0 0 40px rgba(52, 199, 89, 0.4);
}

/* Footer */
.footer-text {
    padding: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    z-index: 10;
}

.footer-text a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
}

/* Responsive Rules */
@media (max-width: 768px) {
    .glass-card {
        padding: 30px 20px;
    }
    .main-heading {
        font-size: 1.7rem;
    }
    .sub-description {
        font-size: 0.95rem;
    }
    .developer-contact-banner {
        flex-direction: column;
        text-align: center;
    }
    .invoice-summary-box {
        grid-template-columns: 1fr 1fr;
    }
    .actions-grid {
        grid-template-columns: 1fr;
    }
}
