:root,
:root[data-theme="midnight"] {
    --theme-color-scheme: dark;
    --primary: #dde4f0;
    --accent: #6b8aff;
    --text: #7a96b8;
    --bg: #07090f;
    --card-bg: #131929;
    --border: #253251;
    --danger: #ef5350;
}

:root[data-theme="ocean"] {
    --theme-color-scheme: dark;
    --primary: #dcf5fb;
    --accent: #39bdd8;
    --text: #8bc0cc;
    --bg: #081418;
    --card-bg: #102229;
    --border: #2b5a67;
    --danger: #f06f66;
}

:root[data-theme="sunrise"] {
    --theme-color-scheme: light;
    --primary: #1e2c40;
    --accent: #2f63d9;
    --text: #5f6f86;
    --bg: #f7f4ee;
    --card-bg: #fdfaf4;
    --border: #d8d0c1;
    --danger: #d64545;
}

html {
    color-scheme: var(--theme-color-scheme);
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--primary);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.container {
    max-width: 600px;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: -1px;
    margin-bottom: 10px;
    -webkit-user-select: none;
    user-select: none;
}

.logo span {
    color: var(--accent);
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 400;
}

.description {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 30px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.service-item {
    background: var(--bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    color: var(--primary);
    border-left: 4px solid var(--accent);
}

.footer {
    font-size: 0.8rem;
    color: var(--text);
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.progress-bar {
    position: relative;
    width: 100%;
    background: var(--border);
    height: 8px;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.2) 10px,
        rgba(0, 0, 0, 0.2) 20px
    );
    pointer-events: none;
    border-radius: 10px;
}

.progress-fill {
    width: 17%;
    height: 100%;
    background: var(--accent);
    border-radius: 10px;
}

.google-signin {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}

.signin-intro {
    margin: 0;
    font-size: 0.95rem;
    color: var(--primary);
}

.personal-signin-shell {
    position: relative;
    width: min(230px, 100%);
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.personal-signin-shell:hover,
.personal-signin-shell:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(107, 138, 255, 0.24);
}

.personal-signin-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    color: #1a73e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    z-index: 1;
}

.personal-signin-label {
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    z-index: 1;
}

#g_id_signin {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0.015;
    cursor: pointer;
    min-width: 0;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    overflow: hidden;
}

#g_id_signin > div,
#g_id_signin iframe {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
}

#g_id_signin > div {
    margin: 0 !important;
}

body.debug-auth-active #g_id_signin {
    display: none;
}

body.debug-auth-active .personal-signin-shell {
    background: color-mix(in srgb, var(--card-bg) 76%, var(--accent) 24%);
}

body.debug-auth-active .personal-signin-shell[data-busy='1'] {
    opacity: 0.75;
    pointer-events: none;
}

#message {
    color: var(--danger);
    margin-top: 1rem;
}

.small {
    color: var(--accent);
    font-size: 0.9rem;
}

.launch-progress {
    font-size: 0.8rem;
    margin-bottom: 40px;
}

@media (max-width: 640px) {
    .personal-signin-shell {
        width: min(200px, 100%);
        height: 42px;
    }

    .personal-signin-label {
        font-size: 0.85rem;
    }
}
