* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body{
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a0a15 0%, #2d1218 30%, #0a0505 60%, #1a0a10 100%);
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, #0a0505, transparent);
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, #0a0505, transparent);
    pointer-events: none;
}

@keyframes moveLight{
    0%{transform:translateY(-40px);}
    100%{transform:translateY(40px);}
}

.main{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 80%;
}

.container {
    position: relative;
    width: 420px;
    height: 510px;
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    transition: 0.5s;
   }

.container:hover::before {    
    left: 120%;
}

.container h2 {
    color: #fff;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 1px;
    margin-bottom: 40px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    outline: none;
    border-radius: 35px;
    font-size: 16px;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.input-group input:focus {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.input-group label {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
}
.input-group input:focus + label,
.input-group input:valid + label {
    top: 0;
    left: 15px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.remember-forgot label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-forgot input {
    margin-right: 8px;
    accent-color: #fff;
}

.remember-forgot a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.remember-forgot a:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 15px 35px;
    background-color: #ff6b35;
    border: 2px solid transparent;
    border-radius: 30px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

.login-btn:hover {
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.6);
    transform: translateY(-2px);
    background-color: #b22222;
}

.register {
    text-align: center;
    margin-top: 25px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.register a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.register a:hover {
    text-decoration: underline;
}

.back-btn {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 1000;
    padding: 18px 35px;
    background: #ff6b35;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 40px;
    color: #fff;
    font-size: 19px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.6);
    transform: translateY(-2px);
    background-color: #b22222;
    color: #fff;
}

@media (max-width: 480px) {
    .back-btn {
        top: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 14px;
    }
}

.img img {

    width: 600px;
    height: auto;
    border-radius: 30px;
    animation: floatImage 2.5s ease-in-out infinite;

}

@keyframes floatImage {
    0%, 100% {
        transform: translateY(35px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* للشاشات المتوسطة ( tablets) */
@media screen and (max-width: 1024px) {
    .img img {
        width: 450px;
    }
    
    .main {
        width: 90%;
    }
}

/* للشاشات الصغيرة ( tablets صغيرة و موبايل كبير) */
@media screen and (max-width: 768px) {
    .main {
        flex-direction: column-reverse;
        justify-content: center;
        gap: 30px;
        padding: 0 10px;
    }
    
    .container {
        max-width: 450px;
        width: 100%;
        height: auto;
        min-height: 480px;
        padding: 30px 25px;
    }
    
    .img img {
        width: 100%;
        max-width: 400px;
    }
}

/* للشاشات الصغيرة جداً (موبايل) */
@media screen and (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .main {
        padding: 10px;
        gap: 20px;
    }
    
    .container {
        padding: 25px 20px;
    }
    
    .container h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .input-group input {
        padding: 12px 18px;
    }
    
    .remember-forgot {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .img img {
        max-width: 280px;
    }
}

/* للشاشات الطويلة جداً */
@media screen and (min-height: 800px) {
    .main {
        min-height: 80vh;
    }
}