/* ==========================================
   Earning Trick - Login Page
   Exact match to Figma design
   Mobile-first: 412x917
   ========================================== */

/* Import Space Grotesk font */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --bg-dark: #131313;
    --primary-yellow: #FFDB11;
    --text-white: #FFFFFF;
    --text-white-80: rgba(255, 255, 255, 0.8);
    --font-family: 'Space Grotesk', sans-serif;
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--bg-dark);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Login Page Container */
.login-page {
    position: relative;
    width: 100%;
    max-width: 412px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--bg-dark);
    padding: 0 26px;
    display: flex;
    flex-direction: column;
}

/* Header Section */
.header-section {
    padding-top: 74px;
}

.main-title {
    font-family: var(--font-family);
    font-style: normal;
    font-weight: 700;
    font-size: 30px;
    line-height: 38px;
    color: var(--primary-yellow);
    margin-bottom: 11px;
}

.subtitle {
    font-family: var(--font-family);
    font-style: normal;
    font-weight: 400;
    font-size: 15px;
    line-height: 19px;
    color: var(--text-white);
    max-width: 341px;
}

/* Giftbox Section */
.giftbox-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 40px 0;
}

.giftbox-image {
    width: 280px;
    height: 280px;
    object-fit: contain;
}

/* Terms Section */
.terms-section {
    margin-bottom: 12px;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.terms-checkbox input {
    display: none;
}

.checkmark {
    width: 25px;
    height: 25px;
    min-width: 25px;
    background: transparent;
    border: 2px solid var(--text-white-80);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.terms-checkbox input:checked+.checkmark {
    background: var(--primary-yellow);
    border-color: var(--primary-yellow);
}

.terms-checkbox input:checked+.checkmark::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    width: 6px;
    height: 12px;
    border: solid var(--bg-dark);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terms-text {
    font-family: var(--font-family);
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 18px;
    color: var(--text-white-80);
}

.terms-text a {
    color: var(--primary-yellow);
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* Google Button */
.google-btn {
    width: 100%;
    max-width: 359px;
    height: 56px;
    background: var(--primary-yellow);
    border-radius: 50px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 56px;
    transition: all 0.3s ease;
}

.google-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.google-btn:not(:disabled):hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(255, 219, 17, 0.3);
}

.google-btn:not(:disabled):active {
    transform: scale(0.98);
}

.google-icon {
    width: 28px;
    height: 28px;
}

.google-btn span {
    font-family: var(--font-family);
    font-style: normal;
    font-weight: 700;
    font-size: 20px;
    line-height: 26px;
    color: var(--bg-dark);
}

/* ==========================================
   Responsive Design
   ========================================== */

/* Small mobile devices */
@media (max-width: 360px) {
    .main-title {
        font-size: 26px;
        line-height: 34px;
    }

    .subtitle {
        font-size: 14px;
        line-height: 18px;
    }

    .giftbox-image {
        width: 240px;
        height: 240px;
    }

    .google-btn span {
        font-size: 18px;
    }
}

/* Larger mobile devices */
@media (min-width: 480px) {
    .login-page {
        padding: 0 40px;
    }
}

/* Tablets and Desktop */
@media (min-width: 768px) {
    .login-page {
        max-width: 500px;
        padding: 0 50px;
    }

    .header-section {
        padding-top: 100px;
    }

    .main-title {
        font-size: 36px;
        line-height: 44px;
    }

    .subtitle {
        font-size: 16px;
        line-height: 22px;
    }

    .giftbox-image {
        width: 320px;
        height: 320px;
    }

    .google-btn {
        height: 60px;
    }

    .google-btn span {
        font-size: 22px;
    }
}

/* Desktop - Center the login card */
@media (min-width: 1024px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
    }

    .login-page {
        min-height: auto;
        height: auto;
        padding: 60px 50px;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

    .header-section {
        padding-top: 0;
    }

    .giftbox-section {
        padding: 60px 0;
    }

    .google-btn {
        margin-bottom: 0;
    }
}

/* Landscape mode for mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .login-page {
        padding-top: 20px;
    }

    .header-section {
        padding-top: 20px;
    }

    .giftbox-image {
        width: 180px;
        height: 180px;
    }

    .giftbox-section {
        padding: 20px 0;
    }

    .google-btn {
        margin-bottom: 20px;
    }
}

/* Safe area for notched phones */
@supports (padding-top: env(safe-area-inset-top)) {
    .login-page {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}