/* =================================
   Global and Intro Page Styles
   ================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', 'Poppins', sans-serif;
}

body,
html {
    font-family: 'Cairo', 'Poppins', sans-serif;

    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000000 !important;
    color: #fff;
    display: flex;

    justify-content: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

#background-video {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    object-fit: cover;
}

#first-page-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.section {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    position: absolute;
    background-color: rgba(143, 10, 10, 0);
    width: 70vw;
    height: 70vh;
    border-radius: 10px;
}

.section.active {
    display: flex;
    opacity: 1;
}

.section h3 {
    font-size: 1.5rem;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    padding: 10px 20px 20px 20px;
    background-color: rgba(23, 235, 69, 0.4);
    border-radius: 10px;
    text-align: center;
    height: 100%;
    width: 100%;
    margin-bottom: 20%;
}

.indicator {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 10px;
}

.indicator span {
    width: 10px;
    height: 10px;
    background-color: #ccc;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.indicator span.active {
    background-color: #000;
    transform: scale(1.4);
}

.login-button {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 25px;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 100;
    background-image: linear-gradient(144deg, #AF40FF, #5B42F3 50%, #00DDEB);
    box-shadow: rgba(151, 65, 252, 0.2) 0 15px 30px -5px;
    width: 90%;
}

.login-button:hover {
    outline: 0;
    opacity: 0.9;
}

/* =================================
   Forms & Glassmorphism Styles
   ================================= */
.container {
    width: 100%;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;


}

.conrole {
    width: 100%;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #2f02fa10;
}

.glass-box,
.mox {
    width: 90%;
    max-width: 420px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    color: white;
    box-sizing: border-box;
    /* Ensure consistent box model */
}

.glass-box h2,
.mox h2 {
    margin-bottom: 20px;
    font-weight: 600;
}

.glass-box input,
.mox input,
.form-control {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    font-size: 16px;
    text-align: right;
}

.glass-box input::placeholder,
.mox input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
}

.password-field {
    position: relative;
    width: 100%;
}

.password-field input {
    width: 100%;
    padding-left: 40px;
    /* Add padding to prevent text from overlapping with the icon */
}


.input-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 50%;
    left: 15px;
    /* Changed from right to left for RTL */
    transform: translateY(-50%);
    cursor: pointer;
    color: #fcfcfcb7;
}

.glass-box button,
.mox button,
.btn {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: none;
    border-radius: 10px;
    background-color: #1703fb;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.glass-box button:hover,
.mox button:hover,
.btn:hover {
    background-color: #3b82f6;
}

.toggle-link {
    margin-top: 15px;
    display: block;
    color: #fbb303;
    cursor: pointer;
}

.toggle-link:hover {
    text-decoration: underline;
}

.social-login {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 20px;
}

.social-login button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    padding: 10px;
}

.loading {
    font-size: 14px;
    color: white;
}

.wave-text {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
}

.wave-text span {
    display: inline-block;
    font-size: 3rem;
    font-weight: bold;
    color: #ffffff00;
    animation: wave 1.5s infinite;
    animation-delay: calc(0.1s * var(--i));
}

@keyframes wave {

    0%,
    60%,
    100% {
        transform: translateY(0);
        color: rgba(255, 0, 0, 0);
    }

    30% {
        transform: translateY(-15px);
        color: red;
    }
}

/* =================================
   Role Choice & Driver Registration Styles
   ================================= */
.popup.visible {
    display: flex;
    opacity: 1;
    position: relative;
    background: transparent;
    width: 100%;
    min-height: 100vh;
    justify-content: center;
    align-items: center;

}

.role-c {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 95%;
    max-width: 500px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    height: 60vh;
}

.role-c h1 {
    color: white;
    font-size: 2.5rem;
}

.role-card {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid #514fa7;
}

.role-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 8px 15px rgba(233, 223, 223, 0.555);
}

.role-card.selected {
    border-color: #e74c3c;
    transform: scale(1.1);
    background-color: #0dfa05ea;
    /* لون أخضر فاتح عند التأكيد */
    border-color: #27ae60;
    /* تغيير لون الإطار */
    transform: scale(1.3);
    /* تأثير مرئي */
    box-shadow: 0 8px 15px rgba(224, 219, 219, 0.288);
}

.role-card h2 {
    color: #333;
    margin-top: 10px;
}

.choixbtn {
    margin-top: 20px;
    padding: 15px 40px;
    background: #2cf504;
    border-radius: 25px;
    font-size: 1.1em;
    opacity: 0.5;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.choixbtn.show {
    opacity: 1;
    transform: translateY(0);
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =================================
   Screen Transition Animations
   ================================= */
#app-container>div {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.fade-out {
    animation: fadeOut 0.4s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: rotateY(90deg);
    }

    to {
        opacity: 1;
        transform: rotateY(0deg);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: rotateY(0deg);
    }

    to {
        opacity: 0;
        transform: rotateY(90deg);
    }
}

.otp-input {
    width: 45px !important;
    height: 50px;
    font-size: 24px !important;
    text-align: center !important;
    padding: 5px !important;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    -webkit-appearance: textfield;
    /* Chrome, Safari */
    -moz-appearance: textfield;
    /* Firefox */
    appearance: textfield;
    /* Standard */
}

.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.otp-input:focus {
    border-color: #fbb303;
    outline: none;
}

/* Role Choice Styles */
#template-choix-role .role-card {
    width: 150px;
    height: 150px;
    background: white;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 0 10px 6px rgba(248, 248, 248, 0.55);
}

#template-choix-role .role-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

#template-choix-role .role-card.selected {
    border-color: #e74c3c;
    transform: scale(1.05);
    animation: slap 0.4s ease;
    background: rgba(230, 32, 32, 0.507);
}

#template-choix-role .role-card.selected h2 {
    color: #fff;
}

#template-choix-role .role-card h2 {
    color: #077bf0;
    margin: 10px 0 0 0;
    font-size: 1.2em;
}

#template-choix-role .role-card.confirmed {
    background-color: #fa3f05;
    border-color: #27ae60;
    transform: scale(1.1);
}

#template-choix-role .role-card.confirmed h2 {
    color: white;
}

#template-choix-role .choixbtn {
    margin-top: 25px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    visibility: hidden;
}

#template-choix-role .choixbtn.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

@keyframes slap {
    0% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(0.95) rotate(3deg);
    }

    100% {
        transform: scale(1.05) rotate(0deg);
    }
}

#signup-box,
#login-box,
#otp-box,
#reset-box {
    width: 90vw;
    max-width: 420px;
    margin: 5px auto;
    /* Center the boxes */
    padding: 40px;
    box-sizing: border-box;
    /* Ensure consistent box model */
    min-height: 400px;
    /* Ensure consistent height */
}

/* في نهاية ملف style.css */

/* =================================
   Driver Registration Form Styles
   ================================= */

#driver-reg-container {
    text-align: center;
    background: rgba(2, 2, 2, 0.7);
    border-radius: 20px;
    padding: 5px;
    border: 1px solid #333;
    max-width: 700px;
    margin: auto;
    justify-content: center;
    min-height: 95vh;
    max-height: 100vh;
    overflow-y: auto;
    color: white;
    display: flex;
    width: 95vw;
    height: 100%;

    flex-direction: column;
}

#driver-reg-container .form-label {
    font-weight: bold;
    color: #f3f3f9;
}

#driver-reg-container .file-input {
    margin-top: 10px;
}

#driver-reg-container .preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid #00DDEB;
    object-fit: cover;
}

#driver-reg-container .preview-thumb {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #584ba7;
    margin-top: 10px;
    object-fit: cover;
}

#driver-reg-container .form-control,
#driver-reg-container .form-select {
    background-color: #f3f3f9 !important;
    color: #0b0a0a !important;
    border-color: #555 !important;
}

#driver-reg-container .form-control::file-selector-button {
    background-color: rgb(82, 0, 235);
    color: white;
    border: none;
}

#driver-reg-container p.info {
    color: #e6ed00f2;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
}

#driver-reg-container .form-step {
    display: none;
}

#driver-reg-container .form-step.active {
    display: block;
}

#driver-reg-container .progress {
    height: 10px;
}

#driver-reg-container .progress-bar {
    background-color: rgb(82, 0, 235);
}

#driver-reg-container .form-navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

#driver-reg-container #forme-a {
    background-color: #024146;
}