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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url("../img/login_bg.png");
    background-size: cover;
    /* fills screen */
    background-repeat: no-repeat;
    /* no tiling */
    background-position: center;
    /* center image */
    background-attachment: fixed;
    /*background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);*/
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: rgba(30, 30, 47, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    min-height: 600px;
    display: flex;
    transition: all 0.3s ease;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.05)"/><circle cx="80" cy="80" r="1.5" fill="rgba(255,255,255,0.05)"/><circle cx="60" cy="30" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="30" cy="70" r="1.2" fill="rgba(255,255,255,0.05)"/></svg>');
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    z-index: 1;
}

.welcome-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    z-index: 1;
}

.slideshow-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 300px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.slide-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.slide.active .slide-icon {
    animation: iconBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes iconBounce {
    0% {
        transform: scale(0.3) rotate(-10deg);
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

.slide-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.slide-description {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

.slide-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    z-index: 1;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
}

.indicator:hover::before {
    width: 20px;
    height: 20px;
}

.indicator.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.login-right {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #1e1e2f;
}

.form-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.form-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-content.hidden {
    opacity: 0;
    transform: translateX(-20px);
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.form-title {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 10px;
    text-align: center;
}

.form-subtitle {
    color: #b0b0b0;
    text-align: center;
    margin-bottom: 40px;
}

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

.password-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #3a3a4a;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #2a2a3a;
    color: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: #323242;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.form-input::placeholder {
    color: #808080;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #808080;
    font-size: 1.2rem;
    padding: 5px;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #667eea;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b0b0b0;
    font-size: 0.9rem;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #8a95ff;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
    color: #808080;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #3a3a4a;
}

.divider span {
    background: #1e1e2f;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #3a3a4a;
    border-radius: 10px;
    background: #2a2a3a;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #b0b0b0;
    font-weight: 500;
}

.social-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    background: #323242;
}

.social-btn:first-child:hover {
    border-color: #4285F4;
    color: #4285F4;
}

.signup-link {
    text-align: center;
    color: #b0b0b0;
}

.signup-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.signup-link a:hover {
    color: #8a95ff;
}

.error-message {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.success-message {
    color: #51cf66;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    margin-bottom: 20px;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.back-button:hover {
    color: #8a95ff;
    transform: translateX(-5px);
}

.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

.otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid #3a3a4a;
    border-radius: 10px;
    background: #2a2a3a;
    color: #ffffff;
    transition: all 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: #667eea;
    background: #323242;
    transform: scale(1.05);
}

.resend-otp {
    text-align: center;
    margin-top: 15px;
    color: #808080;
    font-size: 0.9rem;
}

.resend-otp button {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
}

.resend-otp button:hover {
    color: #8a95ff;
}

.resend-otp button:disabled {
    color: #555;
    cursor: not-allowed;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        height: auto;
        min-height: auto;
        margin: 20px;
    }

    .login-left {
        display: none;
        /* Hide visual side on mobile to save space */
    }

    .login-right {
        padding: 40px 30px;
        width: 100%;
    }

    .form-title {
        font-size: 1.8rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .social-login {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .login-container {
        margin: 10px;
    }

    .login-right {
        padding: 30px 20px;
    }

    .form-title {
        font-size: 1.6rem;
    }
}