@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
    --primary-color: #6C5CE7;
    --secondary-color: #FF6B6B;
    --accent-color: #FFA502;
    --background-color: #F0F3F7;
    --card-background: rgba(255, 255, 255, 0.8);
    --text-color: #2D3436;
    --text-light: #636E72;
    --shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.signup-form {
    background-color: var(--card-background);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

input, .password-container {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    box-sizing: border-box;
    background-color: white;
}

input:focus, .password-container:focus-within {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.1);
}

.password-container {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0;
}

.password-container input {
    flex: 1;
    border: none;
    padding: 0.8rem;
    padding-right: 2.5rem;
    background-color: transparent;
}

.toggle-password {
    position: absolute;
    right: 0.8rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    background: none;
    border: none;
    padding: 0;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.btn-signup {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-signup:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.login-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.login-link a:hover {
    color: var(--secondary-color);
}

.profile-picture-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.profile-picture-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.profile-picture-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.default-avatar {
    font-size: 3rem;
    color: #999;
}

.profile-picture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-picture-preview:hover .profile-picture-overlay {
    opacity: 1;
}

.profile-picture-overlay i {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.profile-picture-overlay span {
    color: white;
    font-size: 0.8rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    margin-top: 1rem;
}

.password-strength-meter {
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.password-strength-meter::before {
    content: '';
    display: block;
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-text {
    font-size: 0.8rem;
    margin-top: 5px;
    text-align: right;
    font-weight: 500;
    transition: color 0.3s ease;
}

.very-weak::before { width: 20%; background-color: #d13636; }
.weak::before { width: 40%; background-color: #e6da44; }
.medium::before { width: 60%; background-color: #eeac39; }
.strong::before { width: 80%; background-color: #23ad5c; }
.very-strong::before { width: 100%; background-color: #0f7b3d; }

.very-weak .password-strength-text { color: #d13636; }
.weak .password-strength-text { color: #e6da44; }
.medium .password-strength-text { color: #eeac39; }
.strong .password-strength-text { color: #23ad5c; }
.very-strong .password-strength-text { color: #0f7b3d; }

.password-criteria {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.9rem;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.password-criteria h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

.password-criteria ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.password-criteria li {
    margin-bottom: 8px;
    color: #666;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.password-criteria li i {
    margin-right: 10px;
    font-size: 14px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #fff;
    transition: all 0.3s ease;
}

.password-criteria li.valid {
    color: #28a745;
}

.password-criteria li.valid i {
    background-color: #28a745;
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .signup-form {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }

    .btn-signup {
        padding: 0.7rem;
    }
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-20px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background-color: #2ecc71;
}

.notification.error {
    background-color: #e74c3c;
}

.notification.info {
    background-color: #3498db;
}

/* Error message styling */
.error-message {
    display: none;
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}

.error-message.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Password criteria styling */
.password-criteria {
    display: none; /* Hidden by default */
}

.password-criteria.show {
    display: block;
}

/* Hovering message styles */
.hovering-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hovering-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.hovering-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.hovering-message.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}
