/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    background: #fff;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: #5B2D8E;
}

a:hover {
    text-decoration: underline;
}

/* ===== PAGE VISIBILITY ===== */
.page {
    display: none;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.page.active {
    display: flex;
}

/* ===== LOGO ===== */
.logo {
    font-size: 28px;
    font-weight: 700;
    color: #757575;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}

.logo-centered {
    font-size: 28px;
    font-weight: 700;
    color: #757575;
    letter-spacing: -0.5px;
}

/* ===== STEP 1: SPLIT LAYOUT ===== */
.split-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.left-panel {
    flex: 0 0 42%;
    padding: 60px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.left-panel h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 30px;
}

.right-panel {
    flex: 1;
    background: #fff;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* ===== TORN PAPER IMAGE ===== */
.torn-paper-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
}

/* ===== INPUT FIELDS ===== */
.input-field {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
    background: #fafafa;
    margin-bottom: 16px;
}

.input-field:focus {
    border-color: #5B2D8E;
    background: #fff;
}

.input-field::placeholder {
    color: #999;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: #5B2D8E;
    color: #fff;
    border: none;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
    margin-bottom: 30px;
    align-self: flex-start;
}

.btn-primary:hover {
    background: #4a2370;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 45, 142, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ===== TERMS TEXT ===== */
.terms-text {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.terms-text a {
    color: #5B2D8E;
    text-decoration: underline;
}

/* ===== LINKS LIST ===== */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 20px;
}

.link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 15px;
    transition: background 0.2s;
}

.link-item:hover {
    background: #f9f9f9;
    text-decoration: none;
}

.link-item .arrow {
    font-size: 20px;
    color: #999;
}

/* ===== PASSWORD PAGE ===== */
.password-page {
    background: #fff;
}

.password-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid #eee;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 8px;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #5B2D8E;
}

.password-container {
    max-width: 520px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
    overflow-y: auto;
}

.password-container h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
}

.email-display {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.password-input-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.password-field {
    margin-bottom: 4px;
}

.password-field.error {
    border-color: #d32f2f;
    background: #fff5f5;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 4px;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    color: #333;
}

/* ===== ERROR MESSAGE ===== */
.error-message {
    color: #d32f2f;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 6px;
}

.error-message.show {
    display: flex;
}

/* ===== FORGOT LINK ===== */
.forgot-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #5B2D8E;
    margin-bottom: 20px;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ===== CHECKBOX ===== */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #5B2D8E;
    cursor: pointer;
}

/* ===== SIGN IN BUTTON (password page) ===== */
.password-container .btn-primary {
    margin-top: 10px;
    margin-bottom: 24px;
}

/* ===== SIGN AS SOMEONE ELSE ===== */
.sign-as-link {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 30px;
    text-decoration: none;
}

.sign-as-link:hover {
    text-decoration: underline;
}

/* ===== TROUBLE TEXT ===== */
.trouble-text {
    font-size: 14px;
    color: #666;
}

.trouble-text a {
    color: #5B2D8E;
    text-decoration: underline;
}

/* ===== FOOTER ===== */
.site-footer {
    width: 100%;
    background: #fff;
    flex-shrink: 0;
}

.footer-links-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 18px 40px;
    gap: 10px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    color: #1a1a1a;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #5B2D8E;
    text-decoration: none;
}

.cookie-bar {
    background: #111;
    text-align: center;
    padding: 12px 20px;
}

.cookie-link {
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.cookie-link:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    html, body {
        overflow: auto;
    }

    .page {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .split-layout {
        flex-direction: column;
        min-height: auto;
        overflow: visible;
    }

    .left-panel {
        flex: 0 0 auto;
        max-width: 100%;
        padding: 40px 30px;
        overflow: visible;
    }

    .right-panel {
        min-height: 400px;
    }

    .footer-links-container {
        padding: 16px 20px;
        gap: 4px;
    }

    .footer-link {
        padding: 8px 10px;
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .left-panel {
        padding: 30px 20px;
    }

    .left-panel h1 {
        font-size: 24px;
    }

    .password-container h1 {
        font-size: 26px;
    }

    .footer-links-container {
        flex-direction: column;
        align-items: flex-start;
    }
}