/* Kế thừa từ styles.css */
@import url('styles.css');

/* Register Page Specific Styles */
.auth-page {
    min-height: 85vh;
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--light-bg) 0%, #fff 50%, var(--light-bg) 100%);
    display: flex;
    align-items: center;
    position: relative;
}

.auth-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="%23e2e8f0" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.auth-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 99%;
    margin: 0 auto;
    background: var(--white);
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
    width: 600px;
}

.auth-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

/* Card Header */
.auth-card .card-header {
    background: linear-gradient(135deg, var(--header-bg) 0%, var(--secondary) 100%);
    color: var(--white);
    border: none;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.auth-card .card-header::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.auth-card .card-header::after {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.auth-card .card-header h3 {
    font-weight: 700;
    font-size: 1.75rem;
    margin: 0;
    position: relative;
    z-index: 3;
}

/* Card Body */
.auth-card .card-body {
    padding: 2.5rem;
    background: var(--white);
}

/* Form Group Styling */
.mb-3 {
    margin-bottom: 1.5rem !important;
}

/* Form Labels */
.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label::before {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.7;
}

/* Form Controls */
.form-control {
    border: 2px solid var(--border-light);
    border-radius: 15px;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--light-bg);
    color: var(--text-primary);
    position: relative;
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
    font-style: italic;
}

.form-control:focus {
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(237, 25, 37, 0.1);
    outline: none;
    transform: translateY(-2px);
}

.form-control:hover {
    border-color: rgba(237, 25, 37, 0.3);
    background: var(--white);
}

/* Invalid State */
.form-control.is-invalid {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.05);
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
    border-left: 3px solid #dc3545;
}

/* Submit Button */
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border: none;
    border-radius: 15px;
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(237, 25, 37, 0.3);
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(237, 25, 37, 0.4);
    background: linear-gradient(135deg, var(--accent-hover) 0%, #b01018 100%);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(237, 25, 37, 0.3);
}

/* Divider */
hr {
    border: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: 2rem 0;
    position: relative;
}

hr::after {
    content: "HOẶC";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Login Link Section */
.text-center p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.text-center a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.text-center a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.text-center a:hover {
    color: var(--accent-hover);
    text-shadow: 0 2px 4px rgba(237, 25, 37, 0.2);
}

.text-center a:hover::after {
    width: 100%;
}

/* Input Icons (Optional Enhancement) */
.form-control[type="email"]::before {
    font-family: "Font Awesome 6 Free";
    content: "\f0e0";
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-weight: 900;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-page {
        padding: 1.5rem 0;
    }

    .auth-card {
        margin: 0 1rem;
        border-radius: 16px;
    }

    .auth-card .card-body {
        padding: 2rem 1.5rem;
    }

    .auth-card .card-header {
        padding: 1.5rem;
    }

    .auth-card .card-header h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .auth-card .card-body {
        padding: 1.5rem 1rem;
    }

    .auth-card .card-header {
        padding: 1.25rem 1rem;
    }

    .form-control {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Loading Animation for Submit Button */
.btn-primary.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Page Entry Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.8s ease-out;
}

/* Form Field Animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mb-3 {
    animation: slideInLeft 0.6s ease-out;
}

.mb-3:nth-child(1) { animation-delay: 0.1s; }
.mb-3:nth-child(2) { animation-delay: 0.2s; }
.mb-3:nth-child(3) { animation-delay: 0.3s; }
.mb-3:nth-child(4) { animation-delay: 0.4s; }
.mb-3:nth-child(5) { animation-delay: 0.5s; }

/* Password Strength Indicator (Optional) */
.password-strength {
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 0%;
}

.password-strength-weak {
    background: #dc3545;
    width: 25%;
}

.password-strength-fair {
    background: #ffc107;
    width: 50%;
}

.password-strength-good {
    background: #28a745;
    width: 75%;
}

.password-strength-strong {
    background: #20c997;
    width: 100%;
}
