@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background-color: #f0f4f9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.page-container {
    width: 100%;
    max-width: 1040px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.login-container {
    background-color: #ffffff;
    border-radius: 28px;
    padding: 40px 48px;
    display: flex;
    flex-direction: row;
    gap: 100px;
    min-height: 400px;
}

.left-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.google-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
}

.left-section h2 {
    font-size: 36px;
    font-weight: 400;
    color: #1f1f1f;
    line-height: 1.2;
    margin-bottom: 16px;
}

.left-section p {
    font-size: 16px;
    color: #1f1f1f;
    font-weight: 400;
}

.right-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 10px;
}

.login-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.input-group {
    position: relative;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border: 1px solid #747775;
    border-radius: 4px;
    outline: none;
    background: transparent;
    color: #1f1f1f;
    transition: border-color 0.2s, border-width 0.2s;
}

.input-group input:focus {
    border: 2px solid #0b57d0;
    padding: 15px; /* Adjust padding to prevent layout shift from 2px border */
}

.input-group label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    font-size: 16px;
    color: #444746;
    background-color: #ffffff;
    padding: 0 4px;
    transition: 0.15s ease all;
    pointer-events: none;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label {
    top: 0;
    font-size: 12px;
    color: #0b57d0;
}

.input-group input:valid:not(:focus) ~ label {
    color: #444746;
}

.forgot-link {
    text-decoration: none;
    color: #0b57d0;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    margin-bottom: 48px;
    display: inline-block;
}

.forgot-link:hover {
    color: #0842a0;
}

.guest-mode-info {
    font-size: 14px;
    color: #444746;
    line-height: 1.5;
    margin-bottom: 32px;
}

.guest-mode-info a {
    color: #0b57d0;
    text-decoration: none;
    font-weight: 500;
}

.guest-mode-info a:hover {
    color: #0842a0;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 24px 16px;
}

.button-group-right {
    display: flex;
    gap: 12px;
}

.create-account {
    text-decoration: none;
    color: #0b57d0;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 20px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.create-account:hover {
    background-color: #f5f8fe;
}

.hack-btn, .next-btn {
    background-color: #a8c7fa; /* Light blue from the image */
    color: #041e49; /* Dark text */
    border: none;
    border-radius: 20px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    height: 40px;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.hack-btn:hover, .next-btn:hover {
    background-color: #93b7f3;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 0; /* Removing side padding so it aligns with container edge */
    font-size: 12px;
}

.language-selector {
    display: flex;
    align-items: center;
    color: #444746;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    margin-left: -8px; /* Offset the padding to align perfectly left */
}

.language-selector:hover {
    background-color: rgba(68, 71, 70, 0.08);
}

.language-selector svg {
    margin-left: 4px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px; /* Small gap between links, relying on their internal padding */
    margin-right: -12px; /* Offset the padding to align right */
}

.footer-links a {
    color: #444746;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.footer-links a:hover {
    background-color: rgba(68, 71, 70, 0.08);
}

@media (max-width: 800px) {
    .login-container {
        flex-direction: column;
        padding: 36px 32px;
        gap: 40px;
    }
    
    .left-section h2 {
        font-size: 32px;
    }
    
    .actions {
        margin-top: 32px;
    }
}

@media (max-width: 500px) {
    .login-container {
        padding: 32px 24px;
        gap: 32px;
    }
    
    .actions {
        flex-direction: column-reverse;
        align-items: flex-end;
        gap: 32px;
    }
    
    .create-account {
        align-self: flex-start;
        padding-left: 0;
    }
    
    .button-group-right {
        width: 100%;
        justify-content: space-between;
        gap: 16px;
    }
    
    .hack-btn, .next-btn {
        flex: 1;
        padding: 0 16px;
        text-align: center;
    }
    
    .footer {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 8px;
    }
    
    .footer-links {
        justify-content: flex-start;
        margin-right: 0;
        margin-left: -12px;
    }
}

/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0b57d0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
