@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&family=Cairo:wght@400;600;700;800&display=swap');

:root {
    --primary-color: #6c5ce7;
    --primary-hover: #5649c0;
    --bg-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --text-color: #2d3436;
    --text-muted: #636e72;
    --white: #ffffff;
    --error: #d63031;
    --success: #00b894;
    --warning: #f1c40f;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-gradient);
    overflow-x: hidden;
    margin: 0;
    padding: 24px;
    font-family: 'Cairo', sans-serif;
}


.background-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 10s infinite ease-in-out alternate;
}

@keyframes float {
    0% {
        transform: translate(-50%, -50%) translate(-40px, -30px);
    }

    100% {
        transform: translate(-50%, -50%) translate(40px, 30px);
    }
}

.container {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: fadeIn 0.8s ease-out;
}

.logo {
    display: block;
    margin: 0 auto 20px auto;
    width: 100px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.9rem;
}


.input-group {
    margin-bottom: 20px;
    text-align: right;
    width: 100%;
}

.input-group label {
    
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

input {
    width: 90%;
    padding: 12px 16px;
    border: 2px solid #dfe6e9;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}


.toggle-password, .toggle-password-2 {
    position: absolute;
    left: 15px; 
    right: auto; 
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 10;
    transition: color 0.3s ease;
}

.toggle-password:hover, .toggle-password-2:hover {
    color: var(--primary-color);
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    z-index: 10;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-wrapper input:focus ~ .input-icon {
    color: var(--primary-color);
}

.input-wrapper, .password-container {
    position: relative; 
    width: 100%;
    display: flex;
    align-items: center;
}

.input-wrapper input, .password-container input {
    width: 100%;
    padding: 12px 15px;
    padding-left: 45px; 
    padding-right: 42px;
     border: 2px solid #dfe6e9;
    border-radius: 12px;
    outline: none;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-wrapper input:focus, .password-container input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.strength-meter {
    height: 5px;
    width: 100%;
    background: #dfe6e9;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
    display: none;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
    transition: all 0.25s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.error-msg {
    color: var(--error);
    font-size: 0.8rem;
    display: none;
    margin-top: 5px;
}

input.invalid {
    border-color: var(--error);
}

.switch-page {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}



.general-error {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--error);
    background-color: rgba(214, 48, 49, 0.1); 
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--error);
    display: none; 
}


.error-msg {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none; 
    font-weight: 600;
}

/* ===== Tablet & Mobile ===== */
@media (max-width: 700px) {
    body {
        display: flex;
        align-items: center;
        padding: 20px;
    }

    .background-blob {
        display: none;
        animation: none;
    }

    .container {
        width: 100%;
        max-width: 420px;
        padding: 32px 24px;
        border-radius: 18px;
    }

    .logo {
        width: 80px;
    }
}

/* ===== Small phones ===== */
@media (max-width: 380px) {
    .container {
        padding: 26px 18px;
    }

    h2 {
        font-size: 1.2rem;
    }

    .btn-primary {
        padding: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}