:root {
    --primary: #e94560;
    --primary-dark: #c23a51;
    --primary-light: #ff6b81;
    --secondary: #0f3460;
    --accent: #ffcc00;
    --accent-dark: #e6b800;
    --dark: #1a1a2e;
    --darker: #0c0c14;
    --light: #f8f9fa;
    --error: #ff4757;
    --success: #2ed573;
    --warning: #ffa502;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0c0c14 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* Remove default focus outline */
*:focus {
    outline: none !important;
}

/* ============================================
   BACKGROUND ELEMENTS
   ============================================ */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-element {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.bg-element:nth-child(1) {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(233, 69, 96, 0.15) 0%, transparent 70%);
    animation-delay: 0s;
}

.bg-element:nth-child(2) {
    width: 300px;
    height: 300px;
    bottom: -50px;
    right: -50px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.1) 0%, transparent 70%);
    animation-delay: -7s;
}

.bg-element:nth-child(3) {
    width: 250px;
    height: 250px;
    top: 40%;
    right: 20%;
    background: radial-gradient(circle, rgba(15, 52, 96, 0.2) 0%, transparent 70%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-30px) rotate(90deg) scale(1.1);
    }
    50% {
        transform: translateY(20px) rotate(180deg) scale(0.95);
    }
    75% {
        transform: translateY(-15px) rotate(270deg) scale(1.05);
    }
}

/* Film Strip Decoration */
.film-strip {
    position: fixed;
    width: 50px;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 20px,
        rgba(255, 255, 255, 0.03) 20px,
        rgba(255, 255, 255, 0.03) 40px
    );
    z-index: -1;
}

.film-strip::before,
.film-strip::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.05) 15px,
        transparent 15px,
        transparent 25px
    );
}

.film-strip::before {
    left: 5px;
}

.film-strip::after {
    right: 5px;
}

.film-strip-left {
    left: 0;
}

.film-strip-right {
    right: 0;
}

/* ============================================
   LOGIN CONTAINER
   ============================================ */
.login-container {
    max-width: 1100px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER
   ============================================ */
.login-header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(255, 204, 0, 0.6);
    animation: logoPulse 3s infinite ease-in-out;
}

@keyframes logoPulse {
    0%, 100% {
        text-shadow: 0 0 30px rgba(255, 204, 0, 0.6);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 50px rgba(255, 204, 0, 0.9), 0 0 80px rgba(255, 204, 0, 0.4);
        transform: scale(1.05);
    }
}

.login-header h1 {
    font-weight: 800;
    color: white;
    font-size: 2.8rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header > p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* ============================================
   LOGIN CARD
   ============================================ */
.login-card {
    display: flex;
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    animation: cardFadeIn 1s ease-out 0.3s both;
}

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

/* ============================================
   VISUAL SIDE (LEFT)
   ============================================ */
.login-visual {
    flex: 1;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.2) 0%, rgba(15, 52, 96, 0.3) 100%);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.visual-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.visual-icon {
    font-size: 5rem;
    color: var(--accent);
    margin-bottom: 25px;
    animation: iconFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 204, 0, 0.5));
}

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

.visual-content h3 {
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: #fff;
}

.visual-content p {
    opacity: 0.85;
    font-size: 1rem;
    line-height: 1.7;
    max-width: 320px;
    margin: 0 auto;
}

/* Features List */
.features-list {
    margin-top: 35px;
    text-align: left;
    width: 100%;
    max-width: 280px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    opacity: 0;
    animation: featureSlide 0.5s ease forwards;
}

.feature-item:nth-child(1) { animation-delay: 0.6s; }
.feature-item:nth-child(2) { animation-delay: 0.7s; }
.feature-item:nth-child(3) { animation-delay: 0.8s; }
.feature-item:nth-child(4) { animation-delay: 0.9s; }

@keyframes featureSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-item i {
    color: var(--accent);
    margin-right: 12px;
    font-size: 1.1rem;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-element {
    position: absolute;
    color: rgba(255, 255, 255, 0.1);
    font-size: 2rem;
}

.floating-1 {
    top: 10%;
    right: 15%;
    animation: floatElement 6s ease-in-out infinite;
}

.floating-2 {
    bottom: 20%;
    left: 10%;
    animation: floatElement 8s ease-in-out infinite reverse;
    font-size: 1.5rem;
}

.floating-3 {
    top: 60%;
    right: 10%;
    animation: floatElement 7s ease-in-out infinite 1s;
    font-size: 1.2rem;
    color: rgba(255, 204, 0, 0.2);
}

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

/* ============================================
   FORM SIDE (RIGHT)
   ============================================ */
.login-form-container {
    flex: 1;
    padding: 50px 45px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.98) 100%);
}

/* Form Header */
.form-header {
    margin-bottom: 30px;
    text-align: center;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.admin-badge i {
    font-size: 1rem;
}

.form-header h2 {
    color: var(--dark);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.form-header p {
    color: #6c757d;
    font-size: 0.95rem;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.login-form {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.form-label i {
    margin-right: 8px;
    color: var(--primary);
    font-size: 0.85rem;
}

/* Input Group Styling */
.input-group {
    position: relative;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.1);
}

.input-group.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1);
}

.input-group .input-group-text {
    background: #f8f9fa;
    border: none;
    padding: 0 18px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.input-group:focus-within .input-group-text {
    background: rgba(233, 69, 96, 0.05);
    color: var(--primary);
}

.input-group .form-control {
    border: none;
    padding: 16px 15px;
    font-size: 1rem;
    background: transparent;
}

.input-group .form-control:focus {
    box-shadow: none;
}

.input-group .form-control::placeholder {
    color: #adb5bd;
}

/* Password Toggle */
.password-toggle {
    background: #f8f9fa;
    border: none;
    padding: 0 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background: #e9ecef;
}

.password-toggle svg {
    color: #6c757d;
    transition: color 0.3s ease;
}

.password-toggle:hover svg {
    color: var(--primary);
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle.active .eye-open {
    display: none;
}

.password-toggle.active .eye-closed {
    display: block;
}

/* Error Messages */
.error-message {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 6px;
    display: none;
    align-items: center;
    gap: 5px;
}

.error-message.show {
    display: flex;
}

/* Alert */
.alert-danger {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.1) 0%, rgba(255, 71, 87, 0.05) 100%);
    border: 1px solid rgba(255, 71, 87, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    color: var(--error);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* ============================================
   FORM OPTIONS
   ============================================ */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4b5563;
    user-select: none;
}

.custom-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: #fff;
}

.custom-checkbox i {
    font-size: 0.8rem;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkbox-label .custom-checkbox {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
}

.checkbox-container input[type="checkbox"]:checked + .checkbox-label .custom-checkbox i {
    opacity: 1;
    transform: scale(1);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.forgot-link:hover {
    color: var(--primary-dark);
}

/* ============================================
   LOGIN BUTTON
   ============================================ */
.btn-login {
    width: 100%;
    padding: 18px 30px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.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: 0.5s;
}

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

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(233, 69, 96, 0.4);
}

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

/* Button Loader */
.btn-loader {
    display: none;
    gap: 4px;
}

.btn-login.loading .btn-text {
    display: none;
}

.btn-login.loading .btn-loader {
    display: flex;
}

.loader-wave {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: loaderBounce 0.6s infinite alternate;
}

.loader-wave:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-wave:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loaderBounce {
    from {
        opacity: 0.4;
        transform: translateY(0);
    }
    to {
        opacity: 1;
        transform: translateY(-6px);
    }
}

/* ============================================
   LOGIN FOOTER
   ============================================ */
.login-footer {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.security-badge i {
    font-size: 1.1rem;
}

.login-footer p {
    color: #9ca3af;
    font-size: 0.8rem;
    margin: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    .login-card {
        flex-direction: column;
    }
    
    .login-visual {
        padding: 40px 30px;
    }
    
    .login-form-container {
        padding: 40px 30px;
    }
    
    .film-strip {
        display: none;
    }
}

@media (max-width: 576px) {
    body {
        padding: 15px;
    }
    
    .login-header h1 {
        font-size: 2rem;
    }
    
    .logo {
        font-size: 3rem;
    }
    
    .login-visual, 
    .login-form-container {
        padding: 30px 20px;
    }
    
    .visual-icon {
        font-size: 4rem;
    }
    
    .visual-content h3 {
        font-size: 1.4rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .forgot-link {
        align-self: flex-end;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.btn-login:focus-visible,
.forgot-link:focus-visible,
.password-toggle:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================
   JAVASCRIPT EFFECT STYLES
   ============================================ */

/* Valid Input State */
.input-group.valid {
    border-color: var(--success) !important;
    box-shadow: 0 0 0 4px rgba(46, 213, 115, 0.1);
}

.input-group.valid .input-group-text {
    color: var(--success);
}

/* Invalid Input State */
.input-group.invalid {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1);
}

.input-group.invalid .input-group-text {
    color: var(--error);
}

/* Focused State */
.input-group.focused {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.15), 0 0 20px rgba(233, 69, 96, 0.1);
}

/* Password Toggle States */
.password-toggle {
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background: #e9ecef;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.password-toggle:hover svg {
    color: var(--primary);
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle.active .eye-open {
    display: none;
}

.password-toggle.active .eye-closed {
    display: block;
}

/* Button Loading State */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.9;
}

.btn-login .btn-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-login.loading .btn-text {
    display: none !important;
}

.btn-login.loading .btn-loader {
    display: flex !important;
}

.loader-wave {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: loaderBounce 0.6s infinite alternate;
}

.loader-wave:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-wave:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loaderBounce {
    from {
        opacity: 0.4;
        transform: translateY(0);
    }
    to {
        opacity: 1;
        transform: translateY(-8px);
    }
}

/* Error Message Animation */
.error-message {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 6px;
    display: block;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    min-height: 0;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Checkbox Error State */
.checkbox-container .error-message {
    width: 100%;
    flex-basis: 100%;
}

/* Card Hover Effects */
.login-card {
    transition: transform 0.1s ease-out;
}

/* Disabled State for Inputs */
.form-control:disabled,
.input-group-text:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Submit Button Disabled */
.btn-login:disabled {
    cursor: not-allowed;
}

/* Smooth Transitions for All Interactive Elements */
.input-group,
.password-toggle,
.btn-login,
.checkbox-label,
.forgot-link {
    transition: all 0.3s ease;
}

/* Film Reel Loading Animation (for curtain effect) */
@keyframes filmReelSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}