body {
    margin: 0;
    padding: 0;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: sans-serif;
    overflow-x: hidden; /* يمنع ظهور شريط تمرير بالعرض */
}

.video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.container {
    position: relative;
    width: 90%; /* عرض مرن للموبايل */
    max-width: 400px; /* أقصى عرض للاب */
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form {
    width: 100%;
    position: absolute;
    padding: 30px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    box-shadow: 0 0 15px #800000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.5s ease-in-out, opacity 0.3s;
    box-sizing: border-box; /* أهم سطر عشان الأبعاد متضربش */
}

/* حالة الفورم المختفية */
.register {
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none;
}

.login {
    transform: translateX(0);
    opacity: 1;
}

/* حالة التبديل */
.container.active .login {
    transform: translateX(-120%);
    opacity: 0;
    pointer-events: none;
}

.container.active .register {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* تعديل الـ Input Box عشان الأيقونات */
.input-box {
    position: relative;
    width: 100%;
}

.input-box input {
    width: 100%;
    padding: 12px 12px 12px 40px; /* بادينج من الشمال للأيقونة */
    background: transparent;
    border: 1px solid #800000;
    color: white;
    outline: none;
    box-sizing: border-box;
}

.input-box .icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.input-box .icon img {
    width: 20px;
    height: 20px;
}

button {
    padding: 12px;
    border: none;
    background: #800000;
    color: white;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
}

h2, p, .switch {
    text-align: center;
    color: aliceblue;
}

.switch {
    color: #ff4d4d;
    cursor: pointer;
    text-decoration: underline;
}