* {
    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;
    background-color: #0f1116;
    padding: 20px;
}

.container {
    background-color: #1a1d24;
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

h2 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 500;
}

.input-group {
    margin-bottom: 15px;
}

input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: none;
    border-radius: 12px;
    background-color: #282c34;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

input::placeholder {
    color: #8b8d91;
}

input:focus {
    outline: none;
    background-color: #2c313c;
    box-shadow: 0 0 0 2px rgba(62, 130, 247, 0.3);
}

button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background-color: #3e82f7;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2d6fe0;
}

.error, .success {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
}

.error {
    background-color: rgba(255, 69, 58, 0.1);
    color: #ff453a;
}

.success {
    background-color: rgba(48, 209, 88, 0.1);
    color: #30d158;
}

a {
    color: #3e82f7;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2d6fe0;
}

p {
    text-align: center;
    margin-top: 15px;
    color: #8b8d91;
}

.forgot-password {
    display: block;
    text-align: center;
    margin: -5px 0 20px;
    color: #8b8d91;
    font-size: 14px;
}

/* إضافة الأيقونات للحقول */
.input-group {
    position: relative;
}

.input-group input {
    padding-left: 45px;
}

.input-group::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
}

.input-group.username::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%238b8d91" viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
}

.input-group.password::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%238b8d91" viewBox="0 0 24 24"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>');
}

.input-group.email::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%238b8d91" viewBox="0 0 24 24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>');
}

@media screen and (max-width: 768px) {
    .container {
        max-width: 320px;
        padding: 20px;
        margin: 10px;
    }

    h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    input {
        padding: 12px;
        font-size: 14px;
        margin-bottom: 12px;
    }

    button {
        padding: 12px;
        font-size: 14px;
    }

    .forgot-password {
        font-size: 12px;
        margin: -3px 0 15px;
    }

    p {
        font-size: 13px;
        margin-top: 12px;
    }

    .error, .success {
        padding: 8px;
        font-size: 13px;
        margin-bottom: 15px;
    }

    .input-group::before {
        width: 16px;
        height: 16px;
        left: 12px;
    }

    .input-group input {
        padding-left: 35px;
    }
}


@media screen and (max-width: 320px) {
    .container {
        max-width: 280px;
        padding: 15px;
    }

    h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    input {
        padding: 10px;
        font-size: 13px;
    }

    button {
        padding: 10px;
        font-size: 13px;
    }
}
.logo {
    width: 80px;
    height: 80px;
    display: block;
    margin: 0 auto 20px;
    object-fit: contain;
}


@media screen and (max-width: 768px) {
    .logo {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
}


@media screen and (max-width: 320px) {
    .logo {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }
}
.back-btn {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #3e82f7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: #2d6fe0;
}
.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: center;
}

.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: center;
}