/* Modern Register Page Styles */
:root {
    --primary-blue: #2563eb;
    --primary-hover: #1d4ed8;
    --light-blue: #f0f7ff;
    --lighter-blue: #f8fafc;
    --error-red: #dc2626;
    --success-green: #16a34a;
    --text-dark: #0f172a;
    --text-gray: #475569;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(145deg, var(--light-blue), var(--lighter-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    color: var(--text-dark);
}

.container {
    width: 100%;
    max-width: 32rem;
    perspective: 1000px;
}

.form-box {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    transform-origin: center;
    animation: formAppear 0.6s ease-out;
    border: 1px solid var(--border-color);
}

header {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.field {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.field.input label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.field.input input,
.field.input select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background-color: var(--lighter-blue);
}

.field.input input:hover,
.field.input select:hover {
    border-color: var(--primary-blue);
}

.field.input input:focus,
.field.input select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background-color: var(--white);
}

.field.button input {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.field.button input:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.field.button input:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-gray);
}

.link a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.link a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* File input styling */
input[type="file"] {
    font-size: 0.875rem;
    padding: 0.5rem;
}

/* Password strength indicator */
#passwordStrength {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#passwordStrength:empty {
    display: none;
}

/* Show password checkbox styling */
.show-password-label {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-gray);
    cursor: pointer;
}

#showPassword {
    width: 1rem !important;
    height: 1rem;
    margin: 0;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
    max-width: 25rem;
}

.notification.success {
    background-color: var(--success-green);
}

.notification.error {
    background-color: var(--error-red);
}

.close-btn {
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.close-btn:hover {
    opacity: 1;
}

/* Error messages */
[id$="Error"] {
    color: var(--error-red);
    font-size: 0.75rem;
    margin-top: 0.375rem;
    font-weight: 500;
}

/* Animations */
@keyframes formAppear {
    0% {
        opacity: 0;
        transform: rotateX(-10deg) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: rotateX(0) translateY(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%) translateY(-50%);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 640px) {
    body {
        padding: 1rem;
        background: var(--white);
    }
    
    .container {
        max-width: 100%;
    }
    
    .form-box {
        padding: 1.5rem;
        border-radius: 0;
        box-shadow: none;
        border: none;
    }
    
    header {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .field {
        margin-bottom: 1.25rem;
    }
    
    .notification {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

/* Animation delays for fields */
.field:nth-child(1) { animation-delay: 0.1s; }
.field:nth-child(2) { animation-delay: 0.2s; }
.field:nth-child(3) { animation-delay: 0.3s; }
.field:nth-child(4) { animation-delay: 0.4s; }
.field:nth-child(5) { animation-delay: 0.5s; }
.field:nth-child(6) { animation-delay: 0.6s; }
.field:nth-child(7) { animation-delay: 0.7s; }






/* Submit Button Styling */
.field .btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.field .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.field .btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.field .btn:hover::before {
    width: 300px;
    height: 300px;
}

.field .btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Checkbox Styling */
.field input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.375rem;
    margin-right: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    vertical-align: middle;
}

.field input[type="checkbox"]:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.field input[type="checkbox"]:checked::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: bold;
}

.field input[type="checkbox"]:hover {
    border-color: var(--primary-blue);
}

.field input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-focus);
}

.field label[for="remember_me"] {
    font-size: 0.875rem;
    color: var(--text-gray);
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}

/* Links Styling */
.links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-gray);
    line-height: 1.75;
}

.links a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-blue);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.links a:hover {
    color: var(--primary-hover);
}

.links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Responsive Design */
@media (max-width: 640px) {
    .field .btn {
        padding: 0.75rem;
        font-size: 0.9375rem;
    }
    
    .field label[for="remember_me"] {
        font-size: 0.8125rem;
    }
    
    .links {
        font-size: 0.8125rem;
    }
    
    .field input[type="checkbox"] {
        width: 1.125rem;
        height: 1.125rem;
    }
}

/* Animation for form fields */
.field {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s ease forwards;
}

.field:nth-child(1) { animation-delay: 0.1s; }
.field:nth-child(2) { animation-delay: 0.2s; }
.field:nth-child(3) { animation-delay: 0.3s; }

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

/* Loading state for button */
.field .btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.field .btn.loading::after {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--white);
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


/* Error Message Container */
.error-container {
    margin: 0 0 1.5rem;
    padding: 1rem;
    background-color: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease-out;
}

/* Error Message Text */
.error-container p {
    color: var(--error-red);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

/* Error Icon */
.error-icon {
    color: var(--error-red);
    width: 1.25rem;
    height: 1.25rem;
}

/* Verify Button */
.error-container .btn {
    background-color: var(--error-red);
    color: var(--white);
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.error-container .btn:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

.error-container .btn:active {
    transform: translateY(0);
}

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

/* Success Message Variant */
.success-container {
    background-color: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.2);
}

.success-container p {
    color: var(--success-green);
}

.success-container .btn {
    background-color: var(--success-green);
}

.success-container .btn:hover {
    background-color: #15803d;
}

.success-container .error-icon {
    color: var(--success-green);
}

/* Message Containers */
.error-container,
.success-container {
    margin: 0 0 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease-out;
}

.error-container {
    background-color: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.success-container {
    background-color: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.2);
}

/* Message Text */
.error-container p,
.success-container p {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.error-container p {
    color: var(--error-red);
}

.success-container p {
    color: var(--success-green);
}

/* Icons */
.error-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.error-container .error-icon {
    color: var(--error-red);
}

.success-container .error-icon {
    color: var(--success-green);
}