/* styles.css */
@font-face {
    font-family: 'ShareTech';
    src: url('/font/ShareTech-Regular.ttf') format('truetype');
}

/* --- Theme Variables (Synced with Index.html) --- */
:root {
    --bg-color: #0A0A0A;
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --card-bg: rgba(255, 255, 255, 0.08); /* Glass */
    --card-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(0, 0, 0, 0.3);
    --input-border: rgba(255, 255, 255, 0.1);
    --primary-color: #667eea;
    --primary-text: #667eea;
    --btn-primary-bg: #fff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --glass-blur: blur(10px);
    /* Removed Gradient Variable, replaced with static color */
    --visual-bg: #050505; 
}

[data-theme="light"] {
    --bg-color: #F0F2F5;
    --text-color: #1A1A1A;
    --text-muted: rgba(0, 0, 0, 0.6);
    --card-bg: #FFFFFF;
    --card-border: rgba(0, 0, 0, 0.08);
    --input-bg: #f8f9fa;
    --input-border: #dee2e6;
    --primary-text: #fff;
    --btn-primary-bg: #667eea;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --visual-bg: #667eea;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'ShareTech', sans-serif;
    background: var(--bg-color); /* Solid Static Background */
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: background 0.3s ease, color 0.3s ease;
}

/* --- Toggle Button --- */
.theme-toggle {
    position: fixed; top: 25px; right: 25px;
    background: var(--card-bg); border: 1px solid var(--card-border);
    color: var(--text-color); width: 45px; height: 45px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    backdrop-filter: var(--glass-blur); transition: all 0.3s ease; z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.theme-toggle:hover { transform: rotate(15deg) scale(1.1); background: var(--input-border); }

/* --- Auth Card (Glassified) --- */
.auth-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    box-shadow: var(--shadow);
    width: 100%; max-width: 450px;
    display: flex; flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.visual-side { display: none; }
.form-side { padding: 40px 30px; width: 100%; position: relative; }

/* --- FORM SECTIONS --- */
#signupForm {
    display: block; 
    animation: fadeIn 0.4s ease;
}

#otpForm {
    display: none; 
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Elements --- */
.logo { 
    width: 90px; height: 90px; margin: 0 auto 20px; display: block; 
    filter: drop-shadow(0 0 25px rgba(102,126,234,0.4)); 
    transition: transform 0.3s;
}
.logo:hover { transform: scale(1.05); }

h1 { text-align: center; font-size: 2.5rem; margin-bottom: 5px; font-weight: 700; }
.subtitle { text-align: center; color: var(--text-muted); font-size: 1rem; margin-bottom: 5px; }
.engine { text-align: center; color: var(--primary-color); font-size: 0.85rem; margin-bottom: 30px; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }

.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-size: 0.95rem; color: var(--text-color); font-weight: 500; }

input {
    width: 100%; padding: 14px 18px;
    background: var(--input-bg); border: 1px solid var(--input-border);
    border-radius: 12px; color: var(--text-color);
    font-family: inherit; font-size: 1rem; transition: all 0.2s ease;
}
input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15); background: rgba(0,0,0,0.5); }
[data-theme="light"] input:focus { background: white; }

.password-requirements { font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }

/* Buttons (Pill Shape matched to Index) */
.btn {
    width: 100%; padding: 15px; border: none; border-radius: 50px;
    font-size: 1.1rem; font-weight: 600; font-family: inherit; cursor: pointer;
    transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-primary { 
    background: var(--btn-primary-bg); 
    color: var(--primary-text); 
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); 
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4); }
.btn-primary:disabled { opacity: 0.7; transform: none; cursor: not-allowed; box-shadow: none; }

.btn-google {
    background: transparent; border: 1px solid var(--card-border); color: var(--text-color); margin-top: 15px;
}
.btn-google:hover { background: var(--input-border); transform: translateY(-2px); }

.divider {
    text-align: center; margin: 30px 0; color: var(--text-muted); position: relative; font-size: 0.85rem;
}
.divider::before, .divider::after {
    content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--card-border);
}
.divider::before { left: 0; } .divider::after { right: 0; }

.links { text-align: center; margin-top: 25px; font-size: 0.95rem; }
.links a { color: var(--primary-color); text-decoration: none; font-weight: 600; }
.links a:hover {  text-shadow: 0 0 10px rgba(102,126,234,0.4); }

.error, .success { 
    padding: 14px; border-radius: 12px; margin-bottom: 20px; font-size: 0.95rem; 
    display: none; text-align: center; backdrop-filter: blur(5px);
}
.error { background: rgba(255, 71, 87, 0.15); color: #ff4757; border: 1px solid rgba(255, 71, 87, 0.3); }
.success { background: rgba(46, 213, 115, 0.15); color: #2ed573; border: 1px solid rgba(46, 213, 115, 0.3); }

/* --- PC Layout --- */
@media screen and (min-width: 1024px) {
    .auth-container { max-width: 1100px; flex-direction: row; min-height: 650px; }
    .visual-side {
        display: flex; flex-direction: column; justify-content: center; align-items: center;
        width: 45%; padding: 60px; 
        background: var(--visual-bg); /* Static dark color */
        border-right: 1px solid var(--card-border);
        color: #fff; text-align: center;
    }
    .visual-side h2 { font-size: 3.5rem; margin-bottom: 20px; font-weight: 700; }
    .visual-side p { font-size: 1.25rem; opacity: 0.8; line-height: 1.6; max-width: 80%; }
    .form-side { width: 55%; padding: 70px; display: flex; flex-direction: column; justify-content: center; }
}
@font-face {
    font-family: 'Share Tech';
    src: url('./font/ShareTech-Regular.ttf') format('truetype');
}

body {
    font-family: 'Share Tech', monospace;
}
/* --- APPEND TO BOTTOM OF styles.css --- */

/* Fluid Theme & Layout Transitions */
body, .auth-container, .visual-side, .theme-toggle {
    transition: background 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Input "Glow" Expansion */
input {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
input:focus {
    transform: scale(1.02);
}

/* Button Jelly Effect */
.btn {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy spring */
}
.btn:hover {
    transform: translateY(-4px) scale(1.02);
}
.btn:active {
    transform: scale(0.95);
}

/* Smooth Form Swapping */
#signupForm, #otpForm {
    animation: fluidFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fluidFadeIn {
    0% { opacity: 0; transform: translateY(15px); filter: blur(5px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
/* --- Link Buttons Styling --- */
.btn-link {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--card-border);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-color);
    background: transparent;
}

.btn-link:hover {
    background: var(--input-border);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- Secondary Button (for Cancel) --- */
.btn-secondary {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-color);
    margin-top: 10px;
}

.btn-secondary:hover {
    background: var(--input-border);
    transform: translateY(-2px);
}

/* --- Enhanced Error/Success Messages --- */
.error, .success {
    animation: slideInDown 0.4s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Improved Links Section --- */
.links {
    text-align: center;
    margin-top: 25px;
    font-size: 0.95rem;
}

.links p {
    margin-bottom: 5px;
    color: var(--text-muted);
}
body {
    height: 100dvh; 
    width: 100vw;
    font-size: 16px;
    padding-top: 0;
    padding-bottom: 0;
}
body.cordova-android-mode {
    padding-top: env(safe-area-inset-top); 
    padding-bottom: env(safe-area-inset-bottom); 
}
.container { 
    display: flex; 
    height: 100%;
    width: 100%;
    position: relative; 
    background: var(--bg-base);
}
body.cordova-android-mode .header {
    /* Ensure header accounts for the padding if it's fixed */
    padding-top: 10px !important; 
}
/* --- KEYBOARD & SCROLL FIX (No overflow:hidden on body) --- */

html, body {
    /* 100% height ensures the app shrinks when keyboard opens */
    height: 100% !important; 
    margin: 0;
    padding: 0;
    padding-top: 10px !important;
}

.container {
    /* Forces the layout to fill exactly the visible screen */
    height: 100% !important; 
    display: flex;
    flex-direction: column;
   
}
@media screen and (max-width: 1024px) {
    .logo{
        display: none !important;
    }
}
/* --- CUSTOM SCROLLBARS --- */

/* 1. Hide Horizontal Scrollbar globally */
body {
    overflow-x: hidden; /* Disables horizontal scroll mechanism */
}

/* 2. Webkit Scrollbar Styling (Chrome, Android, Safari) */
::-webkit-scrollbar {
    width: 8px;               /* Width of the vertical scrollbar */
    height: 0px;              /* Set height to 0 to hide horizontal scrollbar */
    background: transparent;  /* Background of the scrollbar container */
}

/* Track (The background path) */
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05); /* Subtle transparent background */
}

/* Handle (The moving part) */
::-webkit-scrollbar-thumb {
    background: var(--primary-color); /* Uses your defined #667eea */
    border-radius: 10px;      /* Rounded edges */
    border: 2px solid transparent; /* Creates padding effect */
    background-clip: content-box;
}

/* Handle on Hover */
::-webkit-scrollbar-thumb:hover {
    background-color: #5a6fd6;
}

/* Firefox Support */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}