/* ===== BASE RESET ===== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
/* ===== BODY STYLES ===== */
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #8e2de2, #4a00e0);
transition: background 0.4s ease;
overflow: hidden;
}
body.dark {
background: linear-gradient(135deg, #121212, #000000);
}
/* ===== CONTAINER ===== */
.container {
position: relative;
width: 400px;
padding: 2rem;
border-radius: 20px;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(20px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
color: #fff;
transition: background 0.3s ease, color 0.3s ease;
}
/* ===== THEME TOGGLE SWITCH ===== */
.theme-switch {
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 10;
}
.theme-switch input {
display: none;
}
.switch-label {
display: inline-block;
width: 60px;
height: 30px;
background: rgba(255, 255, 255, 0.3);
border-radius: 30px;
position: relative;
cursor: pointer;
transition: background 0.3s ease;
backdrop-filter: blur(8px);
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}
.switch-ball {
position: absolute;
top: 3px;
left: 3px;
width: 24px;
height: 24px;
background: #fff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.3s ease;
color: #ffcc00;
font-size: 0.9rem;
}
input:checked + .switch-label .switch-ball {
transform: translateX(30px);
}
/* Icon visibility */
#sun-icon,
#moon-icon {
position: absolute;
transition: opacity 0.3s ease;
font-size: 1rem;
}
#sun-icon {
opacity: 0;
}
body.dark #sun-icon {
opacity: 1;
}
body.dark #moon-icon {
opacity: 0;
}
/* ===== TAB HEADERS ===== */
.tab-header {
display: flex;
justify-content: space-around;
margin-bottom: 1.5rem;
}
.tab-header button {
flex: 1;
padding: 0.6rem;
background: transparent;
border: none;
color: #fff;
font-size: 1rem;
cursor: pointer;
border-bottom: 2px solid transparent;
transition: all 0.3s ease;
}
.tab-header button.active {
border-color: #fff;
font-weight: 600;
}
body.dark .tab-header button.active {
border-color: #ffd700;
}
/* ===== FORM STYLES ===== */
.form {
display: none;
flex-direction: column;
gap: 1rem;
}
.form.active {
display: flex;
}
.input-group label {
font-size: 0.9rem;
color: #eee;
margin-bottom: 4px;
display: block;
}
.input-group input {
width: 100%;
padding: 0.6rem 0.8rem;
border: none;
border-radius: 8px;
background: rgba(255, 255, 255, 0.2);
color: #fff;
outline: none;
font-size: 0.95rem;
}
.input-group input::placeholder {
color: #ccc;
}
.input-options {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.85rem;
color: #ddd;
}
.input-options a {
color: #ffd700;
text-decoration: none;
}
.input-options a:hover {
text-decoration: underline;
}
.submit-btn {
padding: 0.75rem;
border: none;
background: #fff;
color: #4a00e0;
font-weight: bold;
border-radius: 8px;
cursor: pointer;
font-size: 1rem;
transition: background 0.3s ease;
}
.submit-btn:hover {
background: #f0f0f0;
}
body.dark .submit-btn {
background: #ffd700;
color: #000;
}
body.dark .submit-btn:hover {
background: #e6c200;
}
/* ===== SOCIAL LOGIN BUTTONS ===== */
.social-login {
display: flex;
justify-content: space-between;
margin-top: 1rem;
gap: 10px;
}
.social-login button {
flex: 1;
display: flex;
align-items: center;
gap: 8px;
justify-content: center;
padding: 0.6rem;
border-radius: 8px;
border: none;
color: #fff;
font-size: 0.9rem;
cursor: pointer;
transition: background 0.3s ease;
}
.social-login .google {
background: #db4437;
}
.social-login .facebook {
background: #3b5998;
}
.social-login .twitter {
background: #1da1f2;
}
.social-login button:hover {
filter: brightness(1.1);
}
/* ===== RESPONSIVE ===== */
@media (max-width: 420px) {
.container {
width: 90%;
padding: 1.5rem;
}
.tab-header button {
font-size: 0.9rem;
}
.social-login {
flex-direction: column;
}
}
.password-wrapper {
position: relative;
}
.password-wrapper input {
width: 100%;
padding-right: 40px;
}
.toggle-password {
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
cursor: pointer;
color: #ccc;
font-size: 1rem;
transition: color 0.3s ease;
}
.toggle-password:hover {
color: #fff;
}
body.dark .toggle-password:hover {
color: #ffd700;
}