:root {
    /* Kling-inspired Dark Theme */
    --klin-bg-main: #101114; /* Very dark background */
    --klin-bg-panel: #181A1E; /* Background for the right panel or modal content */
    --klin-text-primary: #EAEAEB; /* Main light text */
    --klin-text-secondary: #86888C; /* Subdued text, placeholders */
    --klin-text-link: #58A6FF; /* A common link blue, can be your --accent-primary if preferred */
    --klin-text-error: #F85149;

    --klin-input-bg: #24262B; /* Darker input background */
    --klin-input-border: #36393F;
    --klin-input-border-focus: var(--klin-text-link);

    --klin-button-primary-bg: var(--klin-text-link); /* Primary action button */
    --klin-button-primary-text: #FFFFFF;
    --klin-button-primary-hover-bg: #4090E0;

    --klin-button-social-bg: #24262B; /* Social buttons */
    --klin-button-social-text: var(--klin-text-primary);
    --klin-button-social-border: #36393F;
    --klin-button-social-hover-bg: #2E3136;
}

.auth-modal-overlay {
	display: block;
	top:0;
	left: 50%;
	transform: translateX(-50%);
    margin: 120px 0 40px;
    position:absolute;
    z-index: 4000;
    width:50%;
}

.auth-modal-content {
    background-color: var(--bg-primary);
    border-radius: 12px; /* Kling's rounding */
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    width:100%;
    max-width: 880px; /* Wider to accommodate two columns */
    display: flex;
    overflow: hidden; /* Important for two-column layout with rounded corners */
    min-height: 600px;
}

.auth-modal-promo {
    flex-basis: 45%; /* Adjust percentage as needed */
    background: url(/images/login_bg.jpg) 50% 50% no-repeat #01030b;
    background-size: 100% auto;
    position: relative;
    overflow: hidden;
}
.auth-modal-promo img,
.auth-modal-promo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.auth-modal-form-section {
	background-color: var(--klin-bg-panel);
    flex-basis: 55%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center content */
    position: relative; /* For the close button if placed here */
}
/* If close button is for the right panel only: */
/* .auth-modal-form-section .auth-modal-close-btn { top: 20px; right: 20px; } */


.auth-panel { width: 100%; } /* Wrapper for different auth states */
.auth-panel > div { display: none; } /* Hide all states initially */
.auth-panel > div.active { display: block; } /* Show active state */

.auth-title {
    font-family: 'Times New Roman', Times, serif; /* Kling uses a serif font for title */
    font-size: 2.2em; /* Adjust as needed */
    font-weight: 600; /* Kling appears bold/semibold */
    margin-bottom: 30px;
    color: var(--klin-text-primary);
    text-align: left;
    line-height: normal;
}
.auth-title span { /* For "Vortex" part to apply gradient */
     background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.auth-sub-title{
	padding-bottom:30px;
	font-size:1.1em;
}
.auth-sub-title>a{
	color:var(--accent-primary);
}

.auth-reset-hint{
	font-size: 0.9em;
	color: var(--klin-text-secondary);
	margin-bottom: 30px;
	text-align: center;
	line-height: 1.5;
}

.social-auth-button{
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 12px 15px; margin-bottom: 15px;
    border-radius: 4px; font-size: 0.95em; font-weight: 500;
    cursor: pointer; transition: background-color 0.2s ease;
    background-color: var(--klin-button-social-bg);
    color: var(--klin-button-social-text);
    border: 1px solid var(--klin-button-social-border);
    text-decoration: none;
}
.social-auth-button:visited{text-decoration: none;color:var(--klin-button-social-text);}
.social-auth-button:hover { background-color: var(--klin-button-social-hover-bg); }
.social-auth-button i { margin-right: 10px; font-size: 1.2em; }
.social-auth-button .fa-google { color: #DB4437; }
.social-auth-button .fa-apple { color: #FFFFFF; }
.social-auth-button .fa-envelope { color: var(--klin-text-secondary); }
.social-auth-button>svg{width:18px;margin-right:16px;}
.social-auth-button>img{width:24px;margin-right:16px;margin-bottom: 2px;}

.auth-separator {
    display: flex; align-items: center; text-align: center;
    color: var(--klin-text-secondary);
    font-size: 0.8em;
    margin: 20px 0;
}
.auth-separator::before, .auth-separator::after {
    content: ''; flex: 1; border-bottom: 1px solid var(--klin-input-border);
}
.auth-separator:not(:empty)::before { margin-right: .5em; }
.auth-separator:not(:empty)::after { margin-left: .5em; }

.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-size: 0.9em; font-weight: 500; color: var(--klin-text-secondary); margin-bottom: 6px; }
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] { /* For potential username field */
    width: 100%;
    background-color: var(--klin-input-bg);
    border: 1px solid var(--klin-input-border);
    border-radius: 8px;
    padding: 12px 15px;
    color: var(--klin-text-primary);
    font-size: 0.95em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus {
    outline: none;
    border-color: var(--klin-input-border-focus);
    box-shadow: 0 0 0 2px rgba(var(--klin-input-border-focus), 0.2);
}
.password-wrapper { position: relative;display: flex;align-items: center;width: 100%;}
.password-toggle {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--klin-text-secondary);
    cursor: pointer; height:30px;
}
.password-toggle>.password-hint{width:30px;height:30px;display:block;background:url(/images/eye.png) 0 0 no-repeat;}
.password-toggle>.password-hint.noeye{background:url(/images/noeye.png) 0 0 no-repeat;}

.forgot-password-link {
    float: right; font-size: 0.85em; color: var(--klin-text-link);
    text-decoration: none; margin-top: -18px; /* Adjust to align with label */
}
.forgot-password-link:hover { text-decoration: underline; }

.submit-auth-button {
    width: 100%; padding: 12px 15px; border-radius: 8px;
    background-color: var(--klin-button-primary-bg);
    color: var(--klin-button-primary-text);
    font-size: 1em; font-weight: 500; border: none; cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px; /* Space above button */
}
.submit-auth-button:hover { background-color: var(--klin-button-primary-hover-bg); }

.auth-navigation-links { margin-top: 25px; font-size: 0.9em; text-align: center; }
.auth-navigation-links a, .back-link {
    color: var(--klin-text-link); text-decoration: none; font-weight: 500;
}
.auth-navigation-links a:hover, .back-link:hover { text-decoration: underline; }
.back-link { margin-bottom: 20px;display: flex;align-items: center;}
.back-link img { margin-right: 5px; }

.auth-terms { font-size: 0.8em; color: var(--klin-text-secondary); margin-top: 30px; text-align: center; line-height: 1.5; }
.auth-terms a { color: var(--klin-text-link); text-decoration: none; }
.auth-terms a:hover { text-decoration: underline; }

.email>img{margin-right:12px;}

.Error{padding-bottom:12px;color:#d00;margin-top: -20px;line-height: 1.35em;}
.Error a{color: var(--klin-text-link);text-decoration: none;}
.Error a:hover{text-decoration: underline;}

/* Responsive adjustments */
@media (max-width: 1200px) {
	.auth-modal-overlay{width:70%;}
}

@media (max-width: 840px) {
	.auth-modal-overlay{width:80%;}
    .auth-modal-content { flex-direction: column; height: auto; max-height: 95vh; }
    .auth-modal-promo { flex-basis: 200px; /* Fixed height for promo on mobile */ min-height: 180px; }
    .auth-modal-form-section { padding: 30px 25px; justify-content: flex-start; flex-grow: 1; overflow-y: auto; }
    .auth-title { font-size: 1.8em; margin-bottom: 25px; text-align: center; }
    .auth-modal-close-btn { /* Position relative to entire modal for mobile */
        top: 10px; right: 10px; background-color: rgba(0,0,0,0.5); color:white;
    }
}

@media (max-width: 540px) {
/*	.user-info{display:none;}*/
}
