/* =========================
   GOOGLE FONT
========================= */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');

/* =========================
   GLOBAL
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    color: white;

    min-height: 100vh;

    background:
        radial-gradient(circle at 20% 30%, rgba(124,58,237,0.25), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(6,182,212,0.25), transparent 40%),
        linear-gradient(135deg, #050816, #0b1220 60%, #020617);

    display: flex;
    flex-direction: column;
}

/* =========================
   WRAPPER
========================= */
.wrapper {
    flex: 1;

    width: 100%;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding: 25px 15px 50px;

    box-sizing: border-box;
}

/* =========================
   MAIN CONTAINER
========================= */
.card {
    width: 100%;
    max-width: 700px;

    padding: 10px;

    background: transparent;
    border: none;
    box-shadow: none;

    text-align: center;
}

/* =========================
   TITLE
========================= */
.card h2 {
    font-size: clamp(28px, 5vw, 42px);

    margin-bottom: 25px;

    line-height: 1.5;

    background: linear-gradient(
        90deg,
        #7c3aed,
        #06b6d4,
        #f59e0b
    );

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================
   FORM
========================= */
.form {
    display: flex;
    flex-direction: column;

    gap: 16px;

    width: 100%;
}

/* =========================
   INPUTS
========================= */
.form input {
    width: 100%;

    padding: 18px;

    font-size: 17px;

    border-radius: 16px;

    color: white;

    background: rgba(0,0,0,0.25);

    border: 2px solid transparent;
    outline: none;

    box-sizing: border-box;

    background-image:
        linear-gradient(#0b1220, #0b1220),
        linear-gradient(
            90deg,
            #ff004c,
            #7c3aed,
            #00d4ff,
            #facc15,
            #ff004c
        );

    background-origin: border-box;
    background-clip: padding-box, border-box;

    background-size: 300% 300%;

    animation: rgbBorder 6s linear infinite;

    transition: 0.3s ease;
}

/* PLACEHOLDER */
.form input::placeholder {
    color: rgba(255,255,255,0.85);
    opacity: 1;
}

/* FOCUS */
.form input:focus {
    box-shadow:
        0 0 0 2px rgba(124,58,237,0.2),
        0 0 25px rgba(124,58,237,0.15);

    transform: translateY(-1px);
}

/* =========================
   SUBJECTS BOX
========================= */
.subjects {
    text-align: right;

    padding: 20px;

    border-radius: 20px;

    background: rgba(255,255,255,0.03);

    border: 1px solid rgba(255,255,255,0.08);

    backdrop-filter: blur(10px);

    display: grid;
    grid-template-columns: 1fr;

    gap: 12px;
}

/* SUBJECT TITLE */
.subjects p {
    grid-column: 1 / -1;

    font-size: 18px;
    font-weight: 700;

    margin-bottom: 10px;
}

/* HIDE CHECKBOX */
.subjects input[type="checkbox"] {
    display: none;
}

/* =========================
   SUBJECT CARD
========================= */
.subjects label {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 75px;

    padding: 20px;

    border-radius: 16px;

    background: rgba(0,0,0,0.25);

    border: 1px solid rgba(255,255,255,0.08);

    cursor: pointer;

    user-select: none;

    transition: 0.25s ease;

    position: relative;

    overflow: hidden;
}

/* TEXT */
.subjects label span {
    font-size: 17px;
    font-weight: 600;

    color: rgba(255,255,255,0.8);

    transition: 0.25s ease;
}

/* HOVER */
.subjects label:hover {
    transform: translateY(-2px);

    border-color: rgba(124,58,237,0.4);

    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* SELECTED */
.subjects label:has(input[type="checkbox"]:checked) {
    background: linear-gradient(
        135deg,
        #7c3aed,
        #06b6d4
    );

    border-color: transparent;

    box-shadow:
        0 0 25px rgba(124,58,237,0.4);

    transform: scale(1.02);
}

.subjects input[type="checkbox"]:checked + span {
    color: white;
}

/* CHECK ICON */
.subjects label:has(input[type="checkbox"]:checked)::after {
    content: "✔";

    position: absolute;

    top: 10px;
    left: 12px;

    font-size: 15px;
    font-weight: bold;

    color: white;
}

/* =========================
   MAIN BUTTON
========================= */
button {
    width: 100%;

    padding: 18px;

    border-radius: 16px;

    border: none;

    font-size: 18px;
    font-weight: 700;

    cursor: pointer;

    color: white;

    background: linear-gradient(
        90deg,
        #7c3aed,
        #06b6d4,
        #f59e0b
    );

    background-size: 200% 200%;

    transition: 0.3s ease;
}

button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 25px rgba(124,58,237,0.25);
}

/* =========================
   LINKS
========================= */
a {
    text-decoration: none;
    display: block;
    width: 100%;
}

/* =========================
   BACK BUTTON
========================= */
a button {
    width: 100%;

    margin-top: 12px;

    background: rgba(17,24,39,0.9);

    border: 1px solid rgba(255,255,255,0.08);

    font-size: 17px;
}

a button:hover {
    background: rgba(31,41,55,0.95);

    border-color: rgba(124,58,237,0.4);
}

/* =========================
   SUCCESS MESSAGE
========================= */
.msg {
    margin-top: 18px;

    font-size: 16px;
    font-weight: 600;

    color: #22c55e;
}

/* =========================
   RGB ANIMATION
========================= */
@keyframes rgbBorder {

    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* =========================
   TABLET
========================= */
@media (min-width: 768px) {

    .subjects {
        grid-template-columns:
            repeat(auto-fit, minmax(220px, 1fr));
    }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {

    .wrapper {
        padding: 20px 15px 40px;
    }

    .card {
        max-width: 100%;
    }

    .card h2 {
        font-size: 30px;
    }

    .form input {
        font-size: 18px;
        padding: 18px;
    }

    .subjects {
        padding: 16px;
    }

    .subjects p {
        font-size: 18px;
    }

    .subjects label {
        min-height: 80px;
    }

    .subjects label span {
        font-size: 18px;
    }

    button {
        font-size: 18px;
        padding: 18px;
    }
}

/* =========================
   SMALL MOBILE
========================= */
@media (max-width: 480px) {

    .wrapper {
        padding: 15px 12px 30px;
    }

    .card h2 {
        font-size: 26px;
    }

    .form input {
        font-size: 17px;
        padding: 16px;
    }

    .subjects {
        gap: 10px;
    }

    .subjects label {
        min-height: 72px;
        padding: 16px;
    }

    .subjects label span {
        font-size: 17px;
    }

    button {
        font-size: 17px;
        padding: 16px;
    }

    .msg {
        font-size: 15px;
    }
}
.country-select {
    width: 100%;
    margin-bottom: 10px;
}

.country-select select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: white;
    font-size: 15px;
    outline: none;
    backdrop-filter: blur(10px);
    transition: 0.3s;
    cursor: pointer;
}

/* hover */
.country-select select:hover {
    border-color: rgba(124,58,237,0.6);
}

/* focus */
.country-select select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
}

/* options (limited browser support but ok) */
.country-select option {
    background: #111827;
    color: white;
}