/* ========================================= */
/* 0. GLOBAL VARIABLES & RESET               */
/* ========================================= */
:root {
    --bg-site: #0B0C10; 
    --bg-card: #1e1e1e;
    --accent: #7300ff;
    --text-main: #ffffff;
    --text-muted: #e0e0e0;
}

*, ::after, ::before {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-site);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    padding-top: 80px;
    overflow-x: hidden;
    width: 100%;
}

/* ========================================= */
/* 1. TYPOGRAPHY                             */
/* ========================================= */
h1, h2 {
    font-family: 'Inter', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-main);
}

a, p {
    font-family: 'Inter', sans-serif;
    font-size: 1.2em;
    color: var(--text-muted);
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

a[href]:hover {
    color: var(--accent);
}

/* ========================================= */
/* 2. LAYOUT CONTAINERS                      */
/* ========================================= */
.main-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1; 
    width: 100%;
    padding: 20px;
    background: transparent;
}

.content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    
    /* 🔥 ЗМІНА: Збільшив ширину з 400px до 420px */
    max-width: 450px; 
    
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px 25px; 
    
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========================================= */
/* 3. FORMS (SIGNUP / LOGIN)                 */
/* ========================================= */
.signup-container {
    width: 100%; 
}

.signup-container h2 {
    margin-bottom: 25px;
    font-size: 24px; 
}

.signup-container form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 18px; 
}

.signup-container label {
    display: block;
    text-align: left;
    font-size: 14px; 
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.signup-container input {
    width: 100%;
    padding: 12px 14px; 
    border: 1px solid #333;
    border-radius: 8px;
    background: #2a2a2a;
    color: white;
    font-size: 16px; 
    outline: none;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

.signup-container input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(115, 0, 255, 0.2);
}

/* Fix for Chrome Autofill background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #2a2a2a inset !important;
    -webkit-text-fill-color: white !important;
}

/* Password Toggle */
.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    padding-right: 45px;
}

.btn-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px; 
    color: #888;
    transition: color 0.3s ease;
    padding: 0;
}

.btn-toggle:hover {
    color: var(--accent);
}

/* Checkbox Terms */
.terms-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px; 
    color: var(--text-muted);
    text-align: left;
    margin-top: 5px;
}

.terms-container input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--accent);
}

.terms-container a {
    color: var(--accent);
    font-weight: bold;
    font-size: inherit;
}

.terms-container a:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn {
    width: 100%;
    padding: 14px; 
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: 16px; 
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn:hover {
    background: #5e00d1;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(115, 0, 255, 0.4);
}

/* Google Button Styles Fix */
.g_id_signin iframe {
    width: 100% !important; 
    max-width: 100% !important;
}
#g_id_onload {
    width: 100%;
}

.not-have-account {
    margin-top: 20px;
    font-size: 14px; 
    color: #888;
}

/* ========================================= */
/* 5. RESPONSIVE                             */
/* ========================================= */
@media (max-width: 480px) {
    .content {
        padding: 20px;
        width: 100%;
        max-width: 100%;
        box-shadow: none; 
        background: transparent; 
        border: none;
    }
    
    .signup-container h2 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .main-content {
        padding: 16px 12px 30px;
        width: 100%;
        box-sizing: border-box;
    }

    .content {
        width: 100%;
        max-width: 100%;
        padding: 16px 12px;
        box-sizing: border-box;
    }

    .signup-container h2 {
        font-size: 1.2rem;
        word-break: break-word;
    }

    .signup-container form,
    .signup-container input,
    .btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .signup-container input,
    .btn {
        min-height: 44px;
    }

    .g_id_signin iframe {
        width: 100% !important;
    }
}

/* Readable, stable forms on phones and tablets. */
.main-content { padding: 32px 20px 48px; }
.content { max-width: 480px; padding: 32px; background: #13141C; border: 1px solid rgba(255,255,255,.1); }
.content:hover { transform: none; }
.signup-container { width: 100%; min-width: 0; }
.signup-container form { gap: 10px; }
.signup-container form > label { margin: 8px 0 0; font-size: 13px; letter-spacing: .4px; text-transform: none; }
.password-container input { padding-right: 56px; }
.btn-toggle { width: 44px; height: 44px; right: 4px; display: flex; align-items: center; justify-content: center; }
.content a[href], .content .logo-title span, .not-have-account a span:last-child { color: #b580ff !important; }
.content input::placeholder { color: #a1a1aa; }
.auth-divider span { background: #13141C !important; }
.not-have-account a { display: inline-block; padding: 8px 0; line-height: 1.5; }
.g_id_signin { min-width: 0; max-width: 100%; }
.modal-overlay { overflow-y: auto; }
.review-box { max-height: calc(100dvh - 32px); overflow-y: auto; margin: auto; }
#toast-container { max-width: calc(100vw - 32px); right: 16px; }
.toast { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
    .main-content { padding: 24px 16px 32px; }
    .content { padding: 24px 20px; }
    .content h2, .signup-container h2 { font-size: 1.3rem; letter-spacing: .3px; }
    .review-box { margin: auto; }
}

.signup-container .terms-container { gap: 12px; align-items: flex-start; }
.signup-container .terms-container input[type="checkbox"] {
    flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 3px 0 0;
}
.signup-container .terms-container label { min-width: 0; min-height: 44px; margin: 0; font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: normal; line-height: 1.6; cursor: pointer; }