/* Modern Dark Theme Login CSS */
:root {
    --bg-color: #0a0a0a;
    --card-bg: #111111;
    --primary-color: #dc3545;
    /* Red accent from image */
    --text-color: #ffffff;
    --text-muted: #888888;
    --input-bg: #1a1a1a;
    --input-border: #333333;
    --input-focus: #444444;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    overflow: hidden;
}

/* Background "Glow" Effect */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(220, 53, 69, 0.1) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.login-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #222;
    position: relative;
    overflow: hidden;
}

/* Top red line effect */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-section img {
    height: 40px;
    margin-bottom: 15px;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
}

.welcome-text {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-text h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.welcome-text p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    z-index: 2;
}

.form-control-custom {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 12px 12px 12px 40px;
    /* Space for icon */
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control-custom:focus {
    outline: none;
    border-color: #555;
    background-color: #222;
}

/* Success/Error borders logic */
.form-control-custom.valid {
    border-color: #28a745;
}

.form-control-custom.invalid {
    border-color: var(--primary-color);
}

.input-group .password-toggle {
    position: absolute;
    right: 15px;
    left: auto;
    /* Fix overlap with left icon */
    cursor: pointer;
    color: var(--text-muted);
    z-index: 2;
}

.input-error-msg {
    color: #ff6b6b;
    /* Softer red */
    font-size: 11px;
    margin-top: 6px;
    font-weight: 400;
    /* Normal weight */
    display: none;
    padding-left: 2px;
    opacity: 0.9;
    letter-spacing: 0.3px;
    animation: fadeIn 0.3s ease-in-out;
}

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

    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-options a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.form-options a:hover {
    color: #fff;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.custom-checkbox input {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

.btn-login {
    width: 100%;
    background: linear-gradient(90deg, #d63031, #ff7675);
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

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

.footer-text {
    text-align: center;
    color: #444;
    font-size: 12px;
    margin-top: 30px;
}

/* Alert styles */
.alert-custom {
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 13px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #5ddc79;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Loader Overlay */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(4px);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10;
    border-radius: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.candlestick-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 60px;
    margin-bottom: 20px;
}

.candle {
    width: 8px;
    background-color: var(--primary-color);
    animation: candleAnim 1s infinite ease-in-out;
    border-radius: 2px;
    position: relative;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

/* Wick */
.candle::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 3px;
    width: 2px;
    height: calc(100% + 10px);
    background-color: rgba(255, 255, 255, 0.5);
    z-index: -1;
}

.candle:nth-child(1) {
    height: 40%;
    animation-delay: 0.1s;
    background-color: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.candle:nth-child(2) {
    height: 70%;
    animation-delay: 0.2s;
}

.candle:nth-child(3) {
    height: 50%;
    animation-delay: 0.3s;
    background-color: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.candle:nth-child(4) {
    height: 90%;
    animation-delay: 0.4s;
}

.candle:nth-child(5) {
    height: 60%;
    animation-delay: 0.5s;
    background-color: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

@keyframes candleAnim {

    0%,
    100% {
        transform: scaleY(1);
        opacity: 0.8;
    }

    50% {
        transform: scaleY(1.5);
        opacity: 1;
    }
}

.loading-text {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}