/* style.css - final UI for Global Unlocker */

/* Basics */
:root {
    --bg: #eef3ff;
    --card: #ffffff;
    --primary1: #2c4cd9;
    /* main title color */
    --primary2: #3f51b5;
    /* buttons */
    --accent: #5c6bc0;
    --muted: #6b7280;
    --radius: 16px;
    --shadow: 0 10px 40px rgba(16, 24, 40, 0.08);
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: "Tajawal", system-ui, -apple-system, Segoe UI, Roboto, Arial
}

body {
    background: var(--bg);
    direction: rtl;
    color: #24333a
}

/* Wrapper */
.center-wrapper {
    max-width: 720px;
    margin: 36px auto;
    padding: 16px
}

/* Header */
.header {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
    background: var(--card);
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
}

.logo {
    width: 78px;
    height: auto;
    border-radius: 10px;
    object-fit: contain
}

.title-block {
    text-align: center
}

.title {
    margin: 0;
    font-size: 28px;
    color: var(--primary1);
    font-weight: 800
}

.subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px
}

/* Main area */
.main-area {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px
}

/* Vertical buttons */
.actions-vertical {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    align-items: center
}

.menu-btn {
    width: 90%;
    max-width: 420px;
    padding: 12px 14px;
    font-size: 18px;
    font-weight: 700;
    color: white;
    background: linear-gradient(90deg, var(--primary2), var(--accent));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 8px 26px rgba(63, 81, 181, 0.12);
    transition: transform .12s ease, box-shadow .12s ease;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(63, 81, 181, 0.16)
}

/* Balance card */
.balance-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card);
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    width: 90%;
    max-width: 520px
}

.big-balance {
    font-size: 34px;
    font-weight: 800;
    color: #13307a;
    margin: 8px 0
}

/* Popups */
.popup {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(6, 10, 26, 0.38);
    z-index: 90
}

.popup[aria-hidden="false"] {
    display: flex
}

.popup-content {
    width: 360px;
    max-width: 94%;
    background: var(--card);
    padding: 22px;
    border-radius: 14px;
    box-shadow: 0 18px 62px rgba(16, 24, 40, 0.12);
    position: relative;
    text-align: center
}

.popup-content.wide {
    width: 700px
}

/* Close */
.close {
    position: absolute;
    left: 14px;
    top: 10px;
    font-size: 24px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #666
}

/* Inputs */
input[type="text"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    margin: 12px 0;
    border-radius: 12px;
    border: 1.2px solid #dbe1ff;
    font-size: 15px;
    background: #fbfdff;
    transition: box-shadow .15s, border-color .15s;
    box-sizing: border-box;
}

/* Ensure numbers are LTR (English digits) */
input[type="number"] {
    direction: ltr !important;
    unicode-bidi: plaintext !important;
    font-family: "Tajawal", system-ui, Segoe UI, Roboto, Arial;
}

/* Focus */
input:focus {
    outline: none;
    border-color: var(--primary2);
    box-shadow: 0 8px 24px rgba(63, 81, 181, 0.12)
}

/* Action button in popup */
.action-btn {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 0;
    background: linear-gradient(90deg, #1e88e5, #1565c0);
    color: #fff;
    font-weight: 700;
    cursor: pointer
}

.secondary-btn {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e6e9ff;
    background: #fff;
    color: var(--muted);
    cursor: pointer
}

/* Orders list */
.orders-list {
    max-height: 300px;
    overflow: auto;
    padding: 10px;
    border-radius: 10px;
    border: 1px dashed #e7e9ff;
    text-align: right
}

/* Result & messages */
.result {
    margin-top: 10px;
    font-weight: 700;
    color: #222
}

.muted {
    color: #8892a0
}

/* Toast */
.toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 22px;
    padding: 12px 18px;
    border-radius: 12px;
    background: #000000dd;
    color: #fff;
    font-weight: 700;
    z-index: 120
}

/* Loader (hidden by default) */
.loader {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200
}

.loader::after {
    content: "";
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 8px solid #eee;
    border-top-color: var(--primary2);
    animation: spin 1s linear infinite;
    box-shadow: 0 8px 30px rgba(63, 81, 181, 0.12)
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

/* Hidden utility */
.hidden {
    display: none !important
}

/* Responsive */
@media (max-width:480px) {
    .title {
        font-size: 22px
    }

    .menu-btn {
        font-size: 16px;
        padding: 10px;
        width: 92%
    }

    .popup-content {
        padding: 16px
    }
}