/* ============================================
   WOLFTRAK GLOBAL — Premium Login Styles
   ============================================ */

:root {
    /* Color System */
    --bg-dark: #060d1a;
    --bg-primary: #0a1628;
    --bg-secondary: #111d33;
    --bg-card: #141e30;
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-input-hover: rgba(255, 255, 255, 0.07);
    --bg-input-focus: rgba(77, 201, 246, 0.08);

    --accent-cyan: #4dc9f6;
    --accent-blue: #2196F3;
    --accent-gradient: linear-gradient(135deg, #4dc9f6 0%, #2196F3 50%, #1976D2 100%);
    --accent-glow: rgba(77, 201, 246, 0.3);

    --text-primary: #f0f4f8;
    --text-secondary: #8899aa;
    --text-muted: #556677;
    --text-accent: #4dc9f6;

    --border-color: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(77, 201, 246, 0.4);

    --danger: #ff5252;
    --success: #00e676;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-dark);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Particle Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   MAIN LAYOUT — Split Screen
   ============================================ */
.login-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 1;
}

/* ============================================
   LEFT SIDE — Login Form
   ============================================ */
.login-side {
    flex: 0 0 42%;
    max-width: 42%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-dark) 100%);
    z-index: 2;
}

.login-side::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, var(--accent-cyan) 50%, transparent 100%);
    opacity: 0.3;
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 0.8s var(--transition-smooth) forwards;
    animation-delay: 0.2s;
}

.logo-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px var(--accent-glow));
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(77, 201, 246, 0.2));
    }

    100% {
        filter: drop-shadow(0 0 25px rgba(77, 201, 246, 0.5));
    }
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-brand {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-primary);
}

.logo-sub {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 6px;
    color: var(--accent-cyan);
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 36px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.6s var(--transition-smooth) forwards;
    animation-delay: 0.4s;
}

.welcome-section h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.6s var(--transition-smooth) forwards;
    animation-delay: 0.6s;
}

/* Input Groups */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    overflow: hidden;
}

.input-group:hover {
    background: var(--bg-input-hover);
    border-color: rgba(255, 255, 255, 0.1);
}

.input-group:focus-within {
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(77, 201, 246, 0.1), 0 0 20px rgba(77, 201, 246, 0.05);
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: all var(--transition-smooth);
    transform: translateX(-50%);
}

.input-group:focus-within .input-highlight {
    width: 100%;
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    height: 48px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.input-group:focus-within .input-icon {
    color: var(--accent-cyan);
}

.input-group input {
    flex: 1;
    height: 52px;
    padding: 0 16px 0 0;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 400;
}

.input-group input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-secondary) inset;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: var(--accent-cyan);
}

.toggle-password {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
    border-radius: var(--radius-sm);
}

.toggle-password:hover {
    color: var(--accent-cyan);
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--text-muted);
    border-radius: 4px;
    transition: all var(--transition-fast);
    position: relative;
}

.remember-me input:checked+.checkmark {
    background: var(--accent-gradient);
    border-color: var(--accent-cyan);
}

.remember-me input:checked+.checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-link {
    font-size: 13px;
    color: var(--text-accent);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.forgot-link:hover {
    color: #7dd8f8;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Login Button */
.btn-login {
    position: relative;
    height: 52px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    overflow: hidden;
    margin-top: 4px;
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(77, 201, 246, 0.35), 0 0 60px rgba(77, 201, 246, 0.1);
}

.btn-login:hover::before {
    opacity: 1;
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(77, 201, 246, 0.2);
}

.btn-login.loading .btn-text {
    opacity: 0;
}

.btn-login.loading .btn-loader {
    opacity: 1;
}

.btn-text {
    transition: opacity var(--transition-fast);
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    color: white;
}

/* Error Message */
.error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 82, 82, 0.08);
    border: 1px solid rgba(255, 82, 82, 0.2);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 13px;
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.error-message.visible {
    opacity: 1;
    transform: translateY(0);
    max-height: 60px;
    padding: 12px 16px;
}

/* Footer */
.login-footer {
    margin-top: 40px;
    opacity: 0;
    animation: fadeInUp 0.6s var(--transition-smooth) forwards;
    animation-delay: 0.8s;
}

.footer-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.footer-divider::before,
.footer-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.footer-divider span {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.footer-copy {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   RIGHT SIDE — Carousel
   ============================================ */
.carousel-side {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(10, 22, 40, 0.7) 0%,
            rgba(10, 22, 40, 0.3) 50%,
            rgba(10, 22, 40, 0.6) 100%);
    z-index: 2;
    pointer-events: none;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transform: scale(1.05);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.carousel-slide.exiting {
    opacity: 0;
    transform: scale(0.98);
    z-index: 0;
}

.carousel-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slide-content {
    position: relative;
    z-index: 3;
    padding: 60px 50px 100px;
    max-width: 600px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.3s;
}

.carousel-slide.active .slide-content {
    opacity: 1;
    transform: translateY(0);
}

.slide-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(77, 201, 246, 0.15);
    border: 1px solid rgba(77, 201, 246, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}

.slide-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.slide-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 40px;
    right: 50px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.indicator {
    width: 32px;
    height: 4px;
    border: none;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all var(--transition-smooth);
    padding: 0;
}

.indicator.active {
    width: 48px;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-glow);
}

.indicator:hover:not(.active) {
    background: rgba(255, 255, 255, 0.4);
}

/* Progress Bar */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 5;
}

.progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    width: 0%;
    transition: width 50ms linear;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
    }

    .login-side {
        flex: none;
        max-width: 100%;
        padding: 30px;
        min-height: 100vh;
    }

    .carousel-side {
        display: none;
    }

    .login-side::after {
        display: none;
    }

    .login-form-wrapper {
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .login-side {
        padding: 24px;
    }

    .welcome-section h1 {
        font-size: 26px;
    }

    .logo-brand {
        font-size: 18px;
    }

    .logo-img {
        width: 42px;
        height: 42px;
    }
}

@media (min-width: 1600px) {
    .login-side {
        flex: 0 0 38%;
        max-width: 38%;
    }

    .login-form-wrapper {
        max-width: 420px;
    }

    .slide-title {
        font-size: 38px;
    }
}