body {
    background-color: #121212;
    color: #e0e0e0;
}

.auth-container {
    max-width: 460px;
    margin: 0 auto;
}

.card {
    background-color: #222222;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    overflow: hidden;
}

.btn-auth {
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-register {
    background-color: #1d1d1b;
    border-color: #1d1d1b;
    color: white;
}

.btn-register:hover {
    background-color: #444;
    border-color: #444;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    color: white;
}

.auth-switch {
    background: #1a1a1a;
    border-radius: 5px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid #333;
}

.auth-switch:hover {
    background: #2a2a2a;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.auth-switch a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    color: #ccc;
    text-decoration: none;
}

.form-control {
    padding: 12px;
    border-radius: 5px;
    background-color: #2d2d2d;
    border-color: #3d3d3d;
    color: #ffffff;
    background-clip: padding-box !important;
    border-bottom-color: #3d3d3d !important;
}

.form-control:focus {
    background-color: #333;
    border-color: #555 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-width: 1px !important;
}

.form-control::placeholder {
    color: #aaaaaa;
}

.form-check-input {
    background-color: #2d2d2d;
    border-color: #3d3d3d;
}

.form-check-input:checked {
    background-color: #444;
    border-color: #444;
}

.form-check-label {
    color: #e0e0e0;
}

.form-floating label {
    padding-left: 15px;
    color: #aaaaaa;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: #fff;
    background-color: #222222;
    opacity: 1;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    padding: 0 0.5rem;
    height: auto;
    border-radius: 3px;
    border-left: 2px solid #555;
}

/* Additional fixes for white background */
.form-floating {
    background-color: transparent !important;
}

.form-floating::before, 
.form-floating::after {
    background-color: transparent !important;
}

.form-floating > label {
    background-color: transparent !important;
}

.form-floating > .form-control:focus ~ label::after,
.form-floating > .form-control:not(:placeholder-shown) ~ label::after,
.form-floating > .form-select ~ label::after {
    background-color: transparent !important;
    color: transparent !important;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    opacity: 1;
    background-color: #222222 !important;
    box-shadow: 0 0 0 2px #222222 !important;
}

/* Remove any background fills that could cause white lines */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover, 
.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #2d2d2d inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

.form-floating > .form-control,
.form-floating > .form-select {
    border-radius: 5px;
    height: calc(3.5rem + 2px);
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    box-shadow: none !important;
    border-color: #555 !important;
    border-width: 1px !important;
}

.animated-bar {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #1d1d1b, #fff);
    margin: 0 auto 1.5rem;
    position: relative;
    overflow: hidden;
}

.animated-bar::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

a {
    color: #fff;
    transition: color 0.3s ease;
}

a:hover {
    color: #ccc;
    text-decoration: none;
}

.is-invalid {
    border-color: #dc3545 !important;
    background-image: none !important;
}

.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

.password-match-message {
    font-size: 0.85rem;
    font-style: italic;
    height: 20px;
    transition: all 0.3s ease;
}

.password-match-error {
    color: #dc3545;
}

.password-match-success {
    color: #1db954;
}

/* Disable button styling */
.btn-auth:disabled {
    background-color: #444;
    border-color: #555;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none !important;
    box-shadow: none !important;
}

/* Password Requirements Floating Panel */
.password-requirements-floating {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    z-index: 10;
}

/* Password Requirements Card - More compact version */
.password-requirements-card {
    background-color: #222222;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid #333;
    min-height: auto;
    max-width: 280px;
}

.password-requirements-card .card-header {
    background-color: #1d1d1b;
    color: white;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
}

.password-requirements-card .card-header h5 {
    font-size: 1rem;
    margin: 0;
}

.password-requirements-card .card-header i {
    color: #fff;
}

.password-requirements-card .card-body {
    padding: 0.75rem;
}

.password-requirements-card .requirements-intro {
    color: #e0e0e0;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.password-requirements-card .requirements-list {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
}

.password-requirements-card .requirements-list li {
    padding: 0.25rem 0;
    color: #aaaaaa !important; /* Force neutral color for text */
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

/* Fix icon colors - make them more specific and prominent */
.password-requirements-card .requirements-list li.requirement-failed i {
    color: #ff4d4d !important; /* Using !important to override any conflicting styles */
}

.password-requirements-card .requirements-list li.requirement-met i {
    color: #4dff88 !important; /* Using !important to override any conflicting styles */
}

/* Requirement text colors */
.password-requirements-card .requirements-list li.requirement-failed {
    color: #ff4d4d;
}

.password-requirements-card .requirements-list li.requirement-met {
    color: #4dff88;
}

.password-requirements-card .requirements-list li i {
    margin-right: 0.75rem;
    min-width: 18px;
    text-align: center;
    font-size: 1rem;
    color: #ff4d4d !important; /* Default red */
}

.password-requirements-card .requirements-list li.requirement-met i {
    color: #4dff88 !important; /* Green when met */
}

/* Animation for requirements */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.requirement-met i {
    animation: pulse 0.5s ease-in-out;
}

/* Responsive Layout */
@media (max-width: 1199.98px) {
    .password-requirements-floating {
        right: 10px;
        width: 250px;
    }
    
    .password-requirements-card {
        max-width: 250px;
    }
    
    .password-requirements-card .requirements-list li {
        font-size: 0.8rem;
    }
}

@media (max-width: 991.98px) {
    .password-requirements-floating {
        position: static;
        width: 100%;
        max-width: 460px;
        transform: none;
        margin: 1.5rem auto 0;
    }
    
    .password-requirements-card {
        max-width: 100%;
    }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .password-requirements-card {
        min-height: auto;
        margin-bottom: 2rem;
    }
}

@media (max-width: 767.98px) {
    .container.my-5 {
        padding: 0 15px;
    }
}

/* Password strength meter - now more compact and directly after requirements */
.password-strength-meter {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #333;
}

.strength-label {
    margin-bottom: 0.4rem; /* Reduced margin */
    font-weight: 500;
    color: #e0e0e0;
    font-size: 0.85rem; /* Smaller font */
}

.strength-bar-container {
    margin-bottom: 5px;
}

.strength-bar {
    height: 8px;
    background-color: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.4rem;
    position: relative;
}

.strength-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    transition: width 0.4s ease, background-color 0.4s ease;
    border-radius: 4px;
}

/* Add new ultra-weak strength level - must appear before other strength classes */
.strength-fill.ultra-weak {
    background-color: #800000; /* Dark red to indicate extreme weakness */
    /* Width set by JS */
}

.strength-text.ultra-weak {
    color: #aaaaaa !important; /* Keep gray per requirements */
}

/* Strength text - keep gray regardless of strength */
.strength-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #aaaaaa !important; /* Force gray color with !important */
    transition: color 0.3s ease;
    text-align: right;
}

/* Strength levels colors - modify to ONLY change background color, not width */
.strength-fill.very-weak {
    background-color: #ff4d4d;
    /* Remove width property - will be set by JS */
}

.strength-fill.weak {
    background-color: #ffa64d;
    /* Remove width property - will be set by JS */
}

.strength-fill.medium {
    background-color: #ffcc4d;
    /* Remove width property - will be set by JS */
}

.strength-fill.strong {
    background-color: #9dff4d;
    /* Remove width property - will be set by JS */
}

.strength-fill.very-strong {
    background-color: #4dff88;
    /* Remove width property - will be set by JS */
}

/* Remove text color classes - text should stay gray */
.strength-text.very-weak,
.strength-text.weak,
.strength-text.medium,
.strength-text.strong,
.strength-text.very-strong {
    color: #aaaaaa !important; /* Force gray color with !important */
}

/* Password Tips section */
.password-tips {
    padding: 1rem;
    background-color: rgba(160, 32, 240, 0.1);
    border-radius: 8px;
    border-left: 3px solid #a020f0;
}

.password-tips h6 {
    color: #e0e0e0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.password-tips h6 i {
    color: #a020f0;
}

.tips-list {
    list-style-type: none;
    padding-left: 0.5rem;
    margin-bottom: 0;
}

.tips-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    color: #cccccc;
    font-size: 0.95rem;
}

.tips-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #a020f0;
}

/* Password Strength Thermometer */
.password-thermometer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #333;
    text-align: center;
}

.thermometer-label {
    font-size: 0.85rem;
    color: #aaaaaa;
    margin-bottom: 8px;
    text-align: left;
}

.thermometer-container {
    height: 70px;
    display: none;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 5px;
    position: relative;
}

.thermometer-background {
    width: 10px;
    height: 50px;
    background-color: #333;
    border-radius: 5px 5px 0 0;
    position: relative;
    overflow: hidden;
    display: none;
}

.thermometer-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: #aaa;
    transition: height 0.4s ease, background-color 0.4s ease;
    display: none;
}

.thermometer-bulb {
    width: 20px;
    height: 20px;
    background-color: #333;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(50%);
    overflow: hidden;
    display: none;
}

.thermometer-bulb-fill {
    width: 100%;
    height: 100%;
    background-color: #aaa;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease, background-color 0.4s ease;
    display: none;
}

.thermometer-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #aaaaaa;
    transition: color 0.4s ease;
}

/* Strength levels colors */
.thermometer-fill.very-weak,
.thermometer-bulb-fill.very-weak {
    background-color: #ff4d4d;
}
.thermometer-text.very-weak {
    color: #ff4d4d;
}

.thermometer-fill.weak,
.thermometer-bulb-fill.weak {
    background-color: #ffa64d;
}
.thermometer-text.weak {
    color: #ffa64d;
}

.thermometer-fill.medium,
.thermometer-bulb-fill.medium {
    background-color: #ffcc4d;
}
.thermometer-text.medium {
    color: #ffcc4d;
}

.thermometer-fill.strong,
.thermometer-bulb-fill.strong {
    background-color: #9dff4d;
}
.thermometer-text.strong {
    color: #9dff4d;
}

.thermometer-fill.very-strong,
.thermometer-bulb-fill.very-strong {
    background-color: #4dff88;
}
.thermometer-text.very-strong {
    color: #4dff88;
}

/* Add glow effect for stronger passwords */
.thermometer-fill.strong,
.thermometer-fill.very-strong,
.thermometer-bulb-fill.strong,
.thermometer-bulb-fill.very-strong {
    box-shadow: 0 0 10px rgba(77, 255, 136, 0.7);
}

/* Password Field with Toggle Button */
.password-field-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 10;
    overflow: hidden;
}

.password-toggle:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.password-toggle i {
    font-size: 1.2rem;
    position: absolute;
    transition: all 0.3s ease;
}

.password-toggle .fa-eye {
    opacity: 1;
    transform: scale(1);
}

.password-toggle .fa-eye-slash {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

.password-toggle.active .fa-eye {
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

.password-toggle.active .fa-eye-slash {
    opacity: 1;
    transform: scale(1) rotate(0);
    color: #fff;
}

/* Cool ripple effect on click */
.toggle-ripple {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    transform: scale(0);
    opacity: 1;
    transition: all 0.5s ease-out;
    pointer-events: none;
}

.password-toggle.clicked .toggle-ripple {
    transform: scale(3);
    opacity: 0;
}

/* Adjust form control padding for password fields */
.password-field-container .form-control {
    padding-right: 50px;
}

/* Password toggle timer countdown */
.visibility-countdown {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: 700;
    animation: fadeIn 0.3s ease;
}

.visibility-countdown svg {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.visibility-countdown circle {
    fill: none;
    stroke-width: 3;
}

.visibility-countdown .circle-bg {
    stroke: rgba(255, 255, 255, 0.2);
}

.visibility-countdown .circle-timer {
    stroke: #fff;
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
    stroke-dasharray: 100.53;  /* 2 * PI * r where r=16 */
}

.visibility-countdown .countdown-number {
    position: relative;
    z-index: 12;
    font-family: monospace;
    color: #fff;
    font-size: 10px;
}

.visibility-countdown.ending .circle-timer {
    stroke: #ff4d4d;
}

.visibility-countdown.ending .countdown-number {
    color: #ff4d4d;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse-warning {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.visibility-countdown.ending {
    animation: pulse-warning 0.5s infinite;
}