@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Modern Color Palette (60-30-10 Rule) */
    /* Primary Brand Color (30%) - Strong Blue */
    --primary-color: #2563EB; /* Tailwind Blue-600 */
    --primary-dark: #1D4ED8;  /* Tailwind Blue-700 */
    
    /* Neutral Colors (60%) */
    --bg-color: #E2E8F0;      /* Slate-200 - Significantly darker for strong contrast */
    --white: #FFFFFF;
    --text-color: #0F172A;    /* Slate-900 - Maximum contrast text */
    --text-light: #64748B;    /* Slate-500 - Readable gray */
    --border-color: #E2E8F0;  /* Slate-200 */
    --input-bg: #F1F5F9;      /* Slate-100 */
    
    /* Accent/Status Colors (10%) */
    --accent-color: #F59E0B;  /* Amber-500 */
    --danger-color: #EF4444;  /* Red-500 */
    --success-color: #10B981; /* Emerald-500 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    width: 900px;
    max-width: 95%;
    min-height: 520px;
}

/* Login Card Section */
.login-card {
    flex: 1;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--primary-dark);
}

.credentials-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.credentials-fields {
    flex: 1;
    min-width: 0;
    margin-left: 0;
    position: relative;
    z-index: 1;
}

.snowman-side {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2px;
    align-self: center;
    position: relative;
    z-index: 2;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.logo-img {
    height: 32px;
    width: auto;
    filter: invert(16%) sepia(96%) saturate(2863%) hue-rotate(203deg) brightness(90%) contrast(101%);
}

.logo i {
    font-size: 24px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
}

.login-card h2 {
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 14px;
}

/* Form Styles */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    transition: color 0.3s;
}

.input-group i.toggle-password {
    left: auto;
    right: 15px;
    cursor: pointer;
}

.input-group input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.input-group input:focus + i {
    color: var(--primary-color);
}

.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-light);
}

.checkbox-container input {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* Make anchor buttons match real buttons */
a.login-btn {
    display: block;
    text-align: center;
    text-decoration: none;
}

.login-btn:hover {
    background-color: var(--primary-dark);
}

/* Guest button (outlined) */
.guest-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    margin-top: 12px;
}

.guest-btn:hover {
    background-color: var(--input-bg);
}

/* Divider */
.divider {
    margin: 25px 0;
    text-align: center;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
}

.divider span {
    background-color: var(--white);
    padding: 0 10px;
    color: var(--text-light);
    font-size: 12px;
    position: relative;
}

/* Social Login */
.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 20px;
    color: var(--text-color);
}

.social-btn:hover {
    background-color: var(--input-bg);
    transform: translateY(-2px);
}

.social-btn.google { color: #DB4437; }
.social-btn.facebook { color: #4267B2; }
.social-btn.apple { color: #000000; }

.signup-link {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
}

.signup-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Ad title links (open in new tab) */
.ad-title-link {
    color: inherit;
    text-decoration: none;
}

.ad-title-link:hover {
    text-decoration: underline;
}

/* Image Section */
.image-section {
    flex: 1;
    background: linear-gradient(rgba(0, 102, 204, 0.4), rgba(0, 76, 153, 0.6)), url('../resources/slike/login_background.webp');
    background-size: cover;
    background-position: 25% center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 50px;
    color: var(--white);
    position: relative;
}

.image-text {
    position: relative;
    z-index: 1;
}

.image-text h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.image-text p {
    font-size: 16px;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        width: 100%;
        min-height: auto;
        border-radius: 20px;
    }

    .image-section {
        display: none;
    }

    .login-card {
        padding: 30px;
    }
}


/* Snowman Animation Styles */
.snowman-container {
    width: 120px;
    height: 120px;
    position: relative;
    transform: translateX(-30px);
}

/* Shift email/password fields left by different amounts */
/*
.credentials-fields .input-group:first-child {
    margin-left: -40px;
}

.credentials-fields .input-group:nth-child(2) {
    margin-left: -40px;
}
*/

.snowman-base {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.snowman-face {
    position: absolute;
    top: 24%; 
    left: calc(50% + 1px);
    transform: translateX(-50%);
    width: 22px;
    height: 16px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.eye {
    width: 6px;
    height: 6px;
    background: white;
    border: 1px solid var(--text-light);
    border-radius: 50%;
    position: absolute;
    top: 0;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1), 0 0 0 1px rgba(15,23,42,0.10);
}

.eye.left-eye {
    left: 2px;
}

.eye.right-eye {
    right: 2px;
}

.pupil {
    width: 2.5px;
    height: 2.5px;
    background: #0F172A;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.1s ease-out;
}

.eyelid {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #E2E8F0; 
    transition: top 0.2s ease;
    z-index: 10;
}

/* Mouth Styles */
.mouth {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.smile, .surprised-mouth, .sad-mouth {
    transition: all 0.3s ease;
}

/* Default Smile - Improved */
.smile {
    width: 10px;
    height: 5px;
    border-bottom: 1px solid #0F172A;
    border-radius: 0 0 50% 50%; 
    display: block;
}

.surprised-mouth {
    width: 4px;
    height: 4px;
    background: #0F172A;
    border-radius: 50%;
    display: none;
}

.sad-mouth {
    width: 10px;
    height: 5px;
    border-top: 1px solid #0F172A;
    border-radius: 50% 50% 0 0;
    display: none;
    margin-top: 2px;
}

/* States */
.snowman-container.surprised .smile {
    display: none;
}

.snowman-container.surprised .surprised-mouth {
    display: block;
}

.snowman-container.surprised .eye {
    transform: scale(1.1);
}

.snowman-container.sad .smile {
    display: none;
}

.snowman-container.sad .sad-mouth {
    display: block;
}

.snowman-container.sad .eyelid {
    top: -40%; /* Half closed */
}

.snowman-container.sad .pupil {
    top: 70%; /* Looking down */
}

/* Closed Eyes State (Password) */
.snowman-container.eyes-closed .eyelid {
    top: 0; /* Fully closed */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 20px;
        align-items: center;
    }

    .login-card {
        padding: 25px 30px;
        justify-content: center;
    }

    .credentials-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }

    .snowman-side {
        width: auto;
        justify-content: center;
        padding-top: 0;
        align-self: flex-start;
    }

    /* Phone safety: avoid horizontal overflow from manual offsets */
    .credentials-fields {
        margin-left: 0;
        width: 100%;
    }

    /*
    .credentials-fields .input-group:first-child,
    .credentials-fields .input-group:nth-child(2) {
        margin-left: -50px;
    }
    */

    .snowman-container {
        transform: translateX(-30px);
        width: 120px;
        height: 120px;
    }
}


