/* Global CSS Reset & Layout Consistency */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 
   We define a highly standardized Design System using CSS Custom Properties.
   Supports automatic system theme detection (Light vs Dark) using modern prefers-color-scheme media queries,
   and adopts exact palette specifications derived from modern Google Accounts login stylesheets.
*/
:root {
    /* Color Palette - DEFAULT LIGHT THEME */
    --body-bg: #f0f4f9;
    --card-bg: #ffffff;
    --card-border: none;
    --text-heading: #1f1f1f;
    --text-body: #1f1f1f;
    --text-accent: #0b57d0;
    --text-accent-hover: #0045ad;
    --text-muted: #5f6368;
    
    /* Next Button */
    --btn-next-bg: #0b57d0;
    --btn-next-hover: #0842a0;
    --btn-next-text: #ffffff;
    
    /* Google SSO Button */
    --btn-google-border: #dadce0;
    --btn-google-bg: transparent; /* Clean, transparent native look */
    --btn-google-hover: rgba(0, 0, 0, 0.04);
    --btn-google-text: #3c4043;
    
    --font-roboto: 'Roboto', sans-serif;
    --transition-speed: 0.15s;
}

/* Dark Mode Preference Theme Variables - Exactly matching the colors from your screenshot */
@media (prefers-color-scheme: dark) {
    :root {
        --body-bg: #1f1f1f; /* Dark background matching outer screenshot frame */
        --card-bg: #0f0f0f; /* Pitch dark card background matching your picture */
        --card-border: 1px solid rgba(255, 255, 255, 0.05);
        --text-heading: #e3e3e3;
        --text-body: #e3e3e3;
        --text-accent: #a8c7fa;
        --text-accent-hover: #c2e7ff;
        --text-muted: #8e918f;
        
        --btn-next-bg: #a8c7fa;
        --btn-next-hover: #c2dbff;
        --btn-next-text: #052d56;
        
        /* Google SSO Button - Dark mode values derived from your crop */
        --btn-google-border: #444746; /* Subtle solid grey border */
        --btn-google-bg: transparent; /* Pure transparent background matching crop */
        --btn-google-hover: rgba(255, 255, 255, 0.04);
        --btn-google-text: #e3e3e3;
    }
}

/* Base Body Framework */
body {
    background-color: var(--body-bg);
    color: var(--text-body);
    font-family: var(--font-roboto);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.main-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1040px; /* Optimized Google 2-column widescreen layout limit */
    align-items: center;
    justify-content: center;
}

/* Primary Google Sign-in Card: Dual Column Layout */
.google-card {
    background-color: var(--card-bg);
    border: var(--card-border);
    border-radius: 28px; /* Material 3 Rounded Corner Token */
    padding: 40px;
    width: 100%;
    min-height: 440px; /* Exact height proportion to match screenshot */
    display: flex;
    flex-direction: row;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    margin-bottom: 24px;
    align-items: stretch; /* Stretch children so heights align */
}

/* Left Pane Section: Header, Title, Subtitle matching the screenshot */
.left-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

.google-logo {
    margin-bottom: 40px; /* Larger vertical margin to push the title down, exactly as in your screenshot */
    display: flex;
    align-items: center;
}

.heading {
    font-size: 2.75rem; /* Larger font size as seen in the original inspect panel */
    font-weight: 400;
    color: var(--text-heading);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.subheading {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-heading);
    line-height: 1.5;
}

/* Right Pane Section: Aligned perfectly to the right side of the card with a central gap */
.right-pane {
    flex: 1;
    display: flex;
    justify-content: flex-end; /* Pushes content to the right side of the card */
    align-items: flex-start;
}

/* 
   The central constraint of Google's layout.
   Interactive inputs and buttons are constrained to exactly 360px wide,
   preventing awkward stretching on wide desktop displays.
*/
.right-content-wrapper {
    width: 100%;
    max-width: 360px; /* Crucial width limit matching real input container sizing */
    height: calc(100% - 72px); /* Adjust height to accommodate margin-top offset, preventing container overflow */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-top: 72px; /* Aligns the top of the SSO button (which replaces the input field) with 'Sign in' */
}

.action-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Official Google Identity Button replacing the email box directly */
.google-sso-btn {
    display: flex;
    align-items: center;
    justify-content: center; /* Clean, centered layout as in your crop */
    width: 100%;
    height: 48px; /* Standard elegant height matching the cropped SSO box proportion */
    background-color: var(--btn-google-bg);
    border: 1px solid var(--btn-google-border);
    border-radius: 4px; /* Official standard border-radius token for Google SSO buttons */
    text-decoration: none;
    font-family: var(--font-roboto);
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease, transform 0.1s ease;
    margin-bottom: 32px;
    padding: 0 16px;
}

.google-sso-btn:hover {
    background-color: var(--btn-google-hover);
    border-color: #8e918f; /* Brightens border on hover matching standard Material input states */
}

.google-sso-btn:active {
    transform: scale(0.99);
}

.google-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.google-btn-icon {
    width: 20px;
    height: 20px;
}

.google-btn-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--btn-google-text);
    letter-spacing: 0.25px;
}

/* Privacy/Guest notification text formatting from the reference screenshot */
.info-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.45;
    text-align: left;
}

.accent-link {
    color: var(--text-accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-speed) ease;
    display: inline-block;
}

.accent-link:hover {
    color: var(--text-accent-hover);
    text-decoration: underline;
}

/* Bottom Actions Panel inside Card container: Aligned perfectly grouped on the bottom right */
.card-actions {
    display: flex;
    justify-content: flex-end; /* Group both "Create account" and "Next" on the bottom-right corner */
    align-items: center;
    margin-top: auto; /* Aligns footer actions beautifully at the bottom edge */
    padding-top: 24px;
    gap: 20px; /* Precise visual spacing gap between "Create account" and "Next" */
}

.create-account-btn {
    color: var(--text-accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 4px;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.create-account-btn:hover {
    background-color: rgba(11, 87, 208, 0.04);
}

@media (prefers-color-scheme: dark) {
    .create-account-btn:hover {
        background-color: rgba(168, 199, 250, 0.08);
    }
}

.next-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background-color: var(--btn-next-bg);
    color: var(--btn-next-text);
    border: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0 24px;
    height: 40px;
    border-radius: 100px; /* Capsule pill layout button as seen in image */
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.next-btn:hover {
    background-color: var(--btn-next-hover);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

/* Outer Footer bar matching the exact placement in picture */
.outer-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    font-size: 0.75rem;
}

.lang-selector {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    margin-left: -12px;
    transition: background-color var(--transition-speed) ease;
}

.lang-selector:hover {
    background-color: rgba(0,0,0,0.03);
}

@media (prefers-color-scheme: dark) {
    .lang-selector:hover {
        background-color: rgba(255,255,255,0.04);
    }
}

.dropdown-arrow {
    margin-left: 6px;
    opacity: 0.7;
}

.footer-meta-links {
    display: flex;
    gap: 1.5rem;
}

.meta-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px;
    border-radius: 4px;
    transition: background-color var(--transition-speed) ease;
}

.meta-link:hover {
    background-color: rgba(0,0,0,0.03);
    color: var(--text-heading);
}

@media (prefers-color-scheme: dark) {
    .meta-link:hover {
        background-color: rgba(255,255,255,0.04);
        color: var(--text-heading);
    }
}

/* Adaptive Responsiveness: shifts beautifully to Single-Pane layout for mobile viewports */
@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding-top: 2rem;
    }

    .main-wrapper {
        min-height: auto;
    }

    .google-card {
        flex-direction: column;
        padding: 24px;
        border-radius: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        min-height: auto;
        gap: 24px;
        margin-bottom: 12px;
    }

    .left-pane {
        padding: 0;
        align-items: flex-start;
    }

    .google-logo {
        margin-bottom: 24px;
    }

    .heading {
        font-size: 2.25rem;
        margin-bottom: 8px;
    }

    .right-pane {
        padding: 0;
        justify-content: flex-start;
    }

    .right-content-wrapper {
        max-width: 100%;
        margin-top: 0;
        height: auto;
        gap: 24px;
    }
    
    .outer-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        padding: 0 24px;
    }
    
    .footer-meta-links {
        width: 100%;
        justify-content: flex-start;
        margin-left: -8px;
    }
}
