/* index.css */

/* Opći stilovi */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f2f5;
    padding: 2rem;
}

.main-container {
    background: white;
    width: 100%;
    max-width: 1200px; /* Ograničite širinu */
    min-height: 600px; /* Osigurajte dovoljno visine */
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin: 2rem auto; /* Centriranje */
}

/* Sekcija za prijavu */
.login-section {
    flex: 0 0 50%;
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Sekcija za registraciju */
.register-section {
    flex: 0 0 50%;
    padding: 3.5rem; /* Veći padding za bolju vidljivost */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Sekcija za slike */
.image-section {
    flex: 0 0 50%;
    background: url('/public/resources/images/login.jpg') center/cover no-repeat;
    position: relative;
    height: auto; /* Omogućite fleksibilnu visinu */
    min-height: 100%;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.3));
}

/* Brand i logo */
.brand {
    margin-bottom: 2.5rem;
}

.logo {
    font-size: 1.75rem;
    color: #1a365d;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-top: 10px;
}

/* Header za prijavu */
.login-header, .register-header {
    margin-bottom: 2.5rem;
}

.login-header h1, .register-header h1 {
    font-size: 2.25rem;
    color: #1a365d;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.login-header p, .register-header p {
    color: #64748b;
    font-size: 1.1rem;
}

/* Form grupa */
.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem; /* Smanjen razmak između labela i inputa */
    color: #334155;
    font-size: 1rem; /* Manji font za labele */
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem; /* Smanjen padding */
    border: 1.5px solid #e2e8f0;
    border-radius: 8px; /* Blago zaobljeni uglovi */
    font-size: 0.8rem; /* Smanjena veličina fonta */
    height: 40px; /* Smanjena visina polja */
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Dugmad */
.login-button, .register-button {
    width: 100%;
    padding: 1rem;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.login-button:hover, .register-button:hover {
    background-color: #1e40af;
}


/* Poruke o greškama */
.error-message {
    color: #d9534f; /* Crvena boja teksta */
    font-size: 0.9rem; /* Manja veličina fonta */
    margin-top: 0.5rem; /* Mali razmak između tipke i teksta */
    text-align: center; /* Centriranje teksta */
    line-height: 1.2;
    min-height: 1.2rem; /* Rezervisanje prostora za tekst greške */
}

.success-message {
    color: #0a8114; /* Crvena boja teksta */
    font-size: 0.9rem; /* Manja veličina fonta */
    margin-top: 0.5rem; /* Mali razmak između tipke i teksta */
    text-align: center; /* Centriranje teksta */
    line-height: 1.2;
    min-height: 1.2rem; /* Rezervisanje prostora za tekst greške */
}


/* Zapamti me */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive dizajn */
@media (max-width: 1024px) {
    .main-container {
        width: 90%;
        height: auto;
        flex-direction: column;
    }

    .login-section, .register-section {
        padding: 2rem;
    }

    .image-section {
        height: 300px;
        order: -1;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .main-container {
        width: 100%;
    }

    .login-section, .register-section {
        padding: 1.5rem;
    }

    .image-section {
        height: 200px;
    }
}
