/**
 * Swizzle Cast - Login Page Redesign
 * Modern, professional login page styling
 */

/* ==========================================
   LOGIN PAGE LAYOUT
   ========================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2B1B3D 0%, #5B2847 50%, #8B3653 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Animated Background Pattern */
.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    opacity: 0.3;
}

.login-page::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 2px, transparent 2px);
    background-size: 80px 80px;
    animation: moveBackground 30s linear infinite reverse;
    opacity: 0.3;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* ==========================================
   LOGIN CONTAINER
   ========================================== */

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
}

/* ==========================================
   LOGO SECTION
   ========================================== */

.login-logo-section {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

.login-logo-img {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 4px 15px rgba(0,0,0,0.3));
    animation: fadeIn 1s ease-out;
}

.login-signin-text {
    color: white;
    font-size: 20px;
    font-weight: 400;
    margin: 0 0 15px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    opacity: 0.9;
}

.login-app-name {
    color: white;
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
    line-height: 1.2;
}

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

/* ==========================================
   LOGIN CARD
   ========================================== */

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
    border: none;
}

/* Card Header with Gradient */
.login-card-header {
    background: linear-gradient(135deg, #2B1B3D 0%, #5B2847 50%, #8B3653 100%);
    padding: 30px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent);
    animation: rotateGlow 10s linear infinite;
}

@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.login-card-header h2 {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Card Body */
.login-card-body {
    padding: 40px;
    border-radius: 24px;
}

/* Sign In Header inside card */
.login-signin-header {
    color: #2B1B3D;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */

.login-form-group {
    margin-bottom: 25px;
    position: relative;
}

.login-form-label {
    display: block;
    font-weight: 600;
    color: #2B1B3D;
    margin-bottom: 10px;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.login-form-input {
    width: 100%;
    padding: 15px 20px;
    padding-left: 50px;
    border: 2px solid #E4E5E8;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #2B3342;
}

.login-form-input:focus {
    outline: none;
    border-color: #8B3653;
    box-shadow: 0 0 0 4px rgba(163, 38, 56, 0.1);
}

.login-form-input::placeholder {
    color: #B7B4BA;
}

/* Input Icons */
.login-input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B3653;
    font-size: 18px;
    transition: all 0.3s ease;
}

.login-form-group:focus-within .login-input-icon {
    color: #2B1B3D;
    transform: translateY(-50%) scale(1.1);
}

/* ==========================================
   ALERTS
   ========================================== */

.login-alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 14px;
    animation: shake 0.5s ease-in-out;
}

.login-alert-danger {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border-left: 4px solid #e83d51;
    color: #a01212;
}

.login-alert-danger ul {
    margin: 0;
    padding-left: 20px;
}

.login-alert-danger li {
    margin: 5px 0;
}

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

/* ==========================================
   SUBMIT BUTTON
   ========================================== */

.login-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #8B3653 0%, #8B3653 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(163, 38, 56, 0.3);
}

.login-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2B1B3D 0%, #5B2847 100%);
    transition: left 0.3s ease;
}

.login-submit-btn span {
    position: relative;
    z-index: 1;
}

.login-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(163, 38, 56, 0.4);
}

.login-submit-btn:hover::before {
    left: 0;
}

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

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

.login-submit-btn.loading::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    z-index: 2;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* ==========================================
   ADDITIONAL LINKS
   ========================================== */

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #E4E5E8;
}

.login-footer a {
    color: #8B3653;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.login-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8B3653, #8B3653);
    transition: width 0.3s ease;
}

.login-footer a:hover {
    color: #8B3653;
}

.login-footer a:hover::after {
    width: 100%;
}

/* ==========================================
   REMEMBER ME CHECKBOX
   ========================================== */

.login-remember {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.login-remember input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #8B3653;
}

.login-remember label {
    color: #5B5B5B;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

/* ==========================================
   DECORATIVE ELEMENTS
   ========================================== */

.login-decorative-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    pointer-events: none;
}

.login-decorative-circle-1 {
    width: 300px;
    height: 300px;
    background: white;
    top: -100px;
    right: -100px;
}

.login-decorative-circle-2 {
    width: 200px;
    height: 200px;
    background: white;
    bottom: -50px;
    left: -50px;
}

.login-decorative-circle-3 {
    width: 150px;
    height: 150px;
    background: white;
    top: 50%;
    left: -75px;
    animation: float 6s ease-in-out infinite;
}

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

/* ==========================================
   ANIMATIONS
   ========================================== */

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

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

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 576px) {
    .login-container {
        max-width: 100%;
    }

    .login-card-body {
        padding: 30px 25px;
    }

    .login-card-header {
        padding: 25px 20px;
    }

    .login-logo-section {
        margin-bottom: 30px;
    }

    .login-logo-img {
        max-width: 220px;
    }

    .login-signin-text {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .login-app-name {
        font-size: 28px;
    }

    .login-signin-header {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .login-form-input {
        padding: 12px 15px;
        padding-left: 45px;
    }

    .login-submit-btn {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-height: 700px) {
    .login-logo-section {
        margin-bottom: 20px;
    }

    .login-card-body {
        padding: 30px;
    }

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

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .login-page {
        background: white;
    }

    .login-card {
        box-shadow: none;
    }

    .login-submit-btn {
        display: none;
    }
}

/* ==========================================
   DARK MODE SUPPORT (Optional)
   ========================================== */

@media (prefers-color-scheme: dark) {
    .login-card {
        background: rgba(255, 255, 255, 0.95);
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

/* Focus visible for keyboard navigation */
.login-form-input:focus-visible,
.login-submit-btn:focus-visible,
.login-footer a:focus-visible {
    outline: 3px solid #8B3653;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
