* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    font-family: 'Arial', sans-serif;
    transition: background 0.3s, color 0.3s;
    position: relative;
}

/* Fullscreen video background */
.bg-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.8;
}

.container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.25);
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    position: relative;
    display: flex;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
}

.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
    opacity: 0;
    z-index: 1;
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
    background: rgba(0, 114, 255, 0.7); /* Semi-transparent blue overlay */
    color: #fff;
}

.container.right-panel-active .overlay {
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
    z-index: 10;
}

.overlay-left {
    transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

form {
    background: #fff;
    display: flex;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
}

h2 {
    margin-bottom: 15px;
    font-size: 28px;
    color: #333;
}

p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

span {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

input {
    background: #eee;
    border: none;
    padding: 14px;
    margin: 8px 0;
    width: 100%;
    border-radius: 8px;
    font-size: 14px;
}

.action-button {
    border: none;
    padding: 12px 35px;
    background-color: #FF4B2B;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    width: 180px;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.18);
}

.action-button:active {
    transform: scale(0.95);
}

button.ghost {
    background: transparent;
    border: 2px solid #fff;
}

.social-container {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.social-container a {
    margin: 0 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.social-container a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.social-container a img {
    width: 22px;
    height: 22px;
}

.options {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 8px 0;
}

.remember-container {
    display: flex;
    align-items: center;
    margin: 6px 0;
}

.remember-container label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
}

.remember-container input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.forgot-password {
    color: #FF4B2B;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #FF416C;
    text-decoration: underline;
}

/* Video container inside the overlay */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    overflow: hidden;
}

#backgroundVideo {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.7; /* Increased opacity for better visibility */
}

.theme-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    background-color: #FF4B2B;
    border-radius: 30px;
    padding: 10px 20px;
    cursor: pointer;
    z-index: 1100;
    font-size: 14px;
    color: #fff;
    border: none;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: #FF416C;
    transform: translateY(-2px);
}

/* Logo style */
.logo {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 22px;
    font-weight: bold;
    color: #333;
    z-index: 1000;
}

/* Dark Mode Styles */
body.dark-mode {
    background: #121212;
    color: white;
}

body.dark-mode .container {
    background: #1f1f1f;
    box-shadow: 0 14px 28px rgba(0,0,0,0.4);
}

body.dark-mode form {
    background: #1f1f1f;
    color: white;
}

body.dark-mode input {
    background: #333;
    color: white;
}

body.dark-mode .options a,
body.dark-mode .remember-container label {
    color: #ddd;
}

body.dark-mode h2, 
body.dark-mode span {
    color: white;
}

body.dark-mode .overlay {
    background: rgba(0, 70, 168, 0.8);
}

body.dark-mode .social-container a {
    background: #333;
}

body.dark-mode .logo {
    color: #fff;
}

/* Ensure video displays properly in all browsers */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    #backgroundVideo {
        display: block !important;
    }
}

/* Media queries for responsive design */
@media (max-width: 992px) {
    .container {
        width: 95%;
        max-width: 850px;
        min-height: 500px;
    }
    
    form {
        padding: 0 30px;
    }
    
    .overlay-panel {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .container {
        min-height: 450px;
    }

    h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    input {
        padding: 12px;
        margin: 6px 0;
    }

    .action-button {
        padding: 10px 25px;
        font-size: 13px;
        width: 160px;
    }

    .social-container a {
        height: 36px;
        width: 36px;
    }

    .social-container a img {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 576px) {
    .container {
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }
    
    .sign-in-container, 
    .sign-up-container {
        width: 100%;
    }
    
    .overlay-container {
        display: none;
    }
    
    .form-container {
        width: 100%;
    }
}