@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root {
    --primary-color: #2870ed;
    --secondary-color: #5b92f2;
    --accent-color: #8ab4f8;
    --bg-color: #e8f0fe;
    --text-color: #333;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    /* background: linear-gradient(135deg, var(--bg-color), #b3e5fc); */
    /* Tint with primary color #2870ed (rgba(40, 112, 237, 0.5)) */
    background: url('../imagini/bg_3.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    /* display: flex; REMOVED - Causes layout issues in Portal */
    /* justify-content: center; REMOVED */
    /* align-items: center; REMOVED */
    /* overflow: hidden; REMOVED - Default scroll logic for portal */
}

/* New class for Login/Register pages that need centering */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Background Animation Effect (Bubbles/Water) */
.bg-bubbles {
    display: none;
    /* Hidden for image background theme */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-bubbles li {
    position: absolute;
    list-style: none;
    display: block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    bottom: -150px;
    animation: square 25s infinite;
    transition-timing-function: linear;
    border-radius: 50%;
}

.bg-bubbles li:nth-child(1) {
    left: 10%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.bg-bubbles li:nth-child(2) {
    left: 20%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.bg-bubbles li:nth-child(3) {
    left: 25%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.bg-bubbles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.bg-bubbles li:nth-child(5) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.bg-bubbles li:nth-child(6) {
    left: 80%;
    width: 120px;
    height: 120px;
    animation-delay: 3s;
    background-color: rgba(255, 255, 255, 0.3);
}

@keyframes square {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-1000px) rotate(600deg);
    }
}

.login-container {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin: 20px 0;
}

.login-header h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.login-header p {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.1);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(3, 169, 244, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.footer-links {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #666;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: none;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Honeypot - Visually Hidden */
.hp-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

/* Responsive Grid for Forms */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: end;
    /* Aligns inputs to bottom if labels vary in height */
}

/* Ensure labels have consistent height or alignment */
.form-group label {
    min-height: 42px;
    /* ~2 lines */
    display: flex;
    align-items: flex-end;
    /* Align text to bottom */
}

.span-2-col {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr !important;
    }

    .span-2-col {
        grid-column: span 1 !important;
    }

    .form-group label {
        min-height: auto;
        /* Reset height on mobile */
    }
}

/* Wide container for registration */
.login-container.wide {
    max-width: 800px;
}

@media (max-width: 820px) {
    .login-container.wide {
        max-width: 95%;
        margin: 20px;
    }
}