/* public_html/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
    --primary: #4F46E5;
    --primary-dark: #4338ca;
    --secondary: #64748b;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-dark: #1f2937;
    --text-light: #9ca3af;
    --danger: #ef4444;
    --success: #10b981;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Navigacija --- */
.navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid #e5e7eb;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.navbar .logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
}

.nav-links a:hover {
    color: var(--primary);
    background-color: #e0e7ff;
}

.nav-links a.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-btn-logout {
    border: 1px solid var(--danger);
    color: var(--danger) !important;
}
.nav-btn-logout:hover {
    background-color: var(--danger) !important;
    color: white !important;
}

.user-status {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #e5e7eb;
}

/* --- Konteineris --- */
.container {
    max-width: 1000px;
    width: 95%;
    margin: 2rem auto;
    flex: 1;
}

/* --- Prisijungimo forma --- */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header h2 { margin-bottom: 0.5rem; color: var(--text-dark); }
.login-header p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 1.5rem; }

.form-group { margin-bottom: 1rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.4rem; font-size: 0.9rem; font-weight: 500; }
.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border 0.2s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.btn-primary:hover { background-color: var(--primary-dark); }
.error-msg { margin-top: 1rem; font-size: 0.9rem; min-height: 1.2em; }

/* --- Mobile Menu --- */
.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    .nav-links.active { display: flex; }
    .menu-toggle { display: block; }
    .user-status { display: none; }
}

/* --- NAUJAS MATEMATIKOS SISTEMOS STILIUS (Fix) --- */

.math-system-display {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 10px;
}

/* Čia piešiamas skliaustas naudojant border, o ne tekstą */
.system-brace {
    width: 12px;
    border-left: 2px solid #1e293b;
    border-top: 2px solid #1e293b;
    border-bottom: 2px solid #1e293b;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
}

/* Mažas "snapelis" skliausto viduryje */
.system-brace::after {
    content: '';
    position: absolute;
    left: -2px; /* Kad uždengtų border-left */
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #1e293b;
    border-radius: 50%;
}

.system-equations {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px; /* Tarpas tarp lygčių */
    padding-left: 15px;
    font-family: 'Times New Roman', serif;
    font-size: 1.25rem;
    font-style: italic;
    color: #1e293b;
}

@keyframes bounceShort {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
.animate-bounce-short {
    animation: bounceShort 0.5s ease-in-out;
}