/* Modern Authentication Dark Theme Styles */
/* Rhino Lights Brand Colors and Design System */

:root {
    --rhino-primary-orange: #f07c00;
    --rhino-dark-bg: #101010;
    --rhino-card-bg: #1a1a1a;
    --rhino-text-light: #f5f5f5;
    --rhino-text-grey: #a0a0a0;
}

/* Override Bootstrap and Theme defaults for a more modern, dark look */
body {
    background-color: var(--rhino-dark-bg);
    color: var(--rhino-text-light);
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 700 !important;
    color: var(--rhino-text-light);
}

.text-primary {
    color: var(--rhino-primary-orange) !important;
}

.btn-primary {
    background-color: var(--rhino-primary-orange) !important;
    border-color: var(--rhino-primary-orange) !important;
    color: #FFF !important;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #d96d00 !important;
    border-color: #d96d00 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(240, 124, 0, 0.3);
}

/* Login/Register Container */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--rhino-dark-bg) 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.login-container::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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%232a2a2a" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.login-card {
    background: var(--rhino-card-bg);
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    animation: slideInUp 0.6s ease-out;
}

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

.login-header {
    background: linear-gradient(135deg, var(--rhino-primary-orange) 0%, #d96d00 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.login-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    margin: 0;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

.login-header p {
    margin: 0.75rem 0 0 0;
    opacity: 0.95;
    font-size: 1rem;
    font-weight: 400;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.login-body {
    padding: 2.5rem 2rem;
}

.form-floating {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out both;
}

.form-floating:nth-child(1) { animation-delay: 0.6s; }
.form-floating:nth-child(2) { animation-delay: 0.7s; }
.form-floating:nth-child(3) { animation-delay: 0.8s; }
.form-floating:nth-child(4) { animation-delay: 0.9s; }
.form-floating:nth-child(5) { animation-delay: 1.0s; }
.form-floating:nth-child(6) { animation-delay: 1.1s; }

.form-floating .form-control {
    background: var(--rhino-dark-bg);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: 1rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--rhino-text-light);
    height: auto;
}

.form-floating .form-control:focus {
    border-color: var(--rhino-primary-orange);
    box-shadow: 0 0 0 0.2rem rgba(240, 124, 0, 0.25);
    background: var(--rhino-dark-bg);
    color: var(--rhino-text-light);
    transform: scale(1.02);
}

.form-floating .form-control::placeholder {
    color: var(--rhino-text-grey);
}

.form-floating label {
    color: var(--rhino-text-grey);
    font-weight: 500;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left top;
}

.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label,
.form-floating .form-control:valid ~ label {
    color: var(--rhino-primary-orange);
    font-weight: 600;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    animation: fadeInUp 0.6s ease-out 1.2s both;
}

.form-check {
    margin: 0;
}

.form-check-input {
    background-color: var(--rhino-dark-bg);
    border: 2px solid #2a2a2a;
    border-radius: 6px;
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.1em;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--rhino-primary-orange);
    border-color: var(--rhino-primary-orange);
    transform: scale(1.1);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(240, 124, 0, 0.25);
}

.form-check-label {
    color: var(--rhino-text-grey);
    font-weight: 500;
    margin-left: 0.5rem;
    transition: color 0.3s ease;
}

.forgot-link {
    color: var(--rhino-primary-orange);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--rhino-primary-orange);
    transition: width 0.3s ease;
}

.forgot-link:hover {
    color: #d96d00;
    text-decoration: none;
}

.forgot-link:hover::after {
    width: 100%;
}

.btn-login {
    background: linear-gradient(135deg, var(--rhino-primary-orange) 0%, #d96d00 100%);
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 124, 0, 0.3);
    width: 100%;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out 1.3s both;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

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

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 124, 0, 0.4);
    color: white;
}

.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
    animation: fadeInUp 0.6s ease-out 1.4s both;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #2a2a2a;
}

.divider span {
    background: var(--rhino-card-bg);
    padding: 0 1rem;
    color: var(--rhino-text-grey);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.register-card {
    background: var(--rhino-dark-bg);
    border: 2px solid #2a2a2a;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out 1.5s both;
}

.register-card:hover {
    border-color: var(--rhino-primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.register-card h4 {
    color: var(--rhino-text-light);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.register-card p {
    color: var(--rhino-text-grey);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-register {
    background: var(--rhino-text-grey);
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(160, 160, 160, 0.3);
    width: 100%;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

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

.btn-register:hover {
    background: #8a8a8a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(160, 160, 160, 0.4);
    color: white;
    text-decoration: none;
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #dc3545;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message strong {
    color: #dc3545;
    font-weight: 600;
}

.error-message ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.error-message li {
    margin-bottom: 0.25rem;
}

/* Success message styles */
.success-message {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #28a745;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive design */
@media (max-width: 576px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        margin: 0;
        border-radius: 15px;
        max-width: 100%;
    }
    
    .login-body {
        padding: 2rem 1.5rem;
    }
    
    .login-header {
        padding: 2rem 1.5rem;
    }
    
    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .btn-login,
    .btn-register {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* Stack form columns on mobile */
    .row .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .row .col-md-6:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .login-header h1 {
        font-size: 1.6rem;
    }
    
    .login-header p {
        font-size: 0.9rem;
    }
    
    .login-body {
        padding: 1.5rem 1rem;
    }
}

/* Loading state for buttons */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes button-loading-spinner {
    from {
        transform: translate(-50%, -50%) rotate(0turn);
    }
    to {
        transform: translate(-50%, -50%) rotate(1turn);
    }
}

/* Focus styles for accessibility */
.form-control:focus,
.btn:focus {
    outline: none;
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Phone input mask styling */
.phone {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Terms checkbox styling */
.form-check.mb-3 {
    margin-bottom: 1.5rem !important;
}

.form-check.mb-3 .form-check-label {
    font-size: 0.9rem;
    line-height: 1.4;
}

.form-check.mb-3 .form-check-label a {
    color: var(--rhino-primary-orange);
    text-decoration: none;
    font-weight: 600;
}

.form-check.mb-3 .form-check-label a:hover {
    text-decoration: underline;
}