/* Captain Claw — Home / Selector Page */

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-hover: #30363d;
    --border: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #58a6ff;
    --accent-hover: #79c0ff;
    --gold: #f0c040;
    --gold-dim: #d4a017;
    --radius: 8px;
    --radius-lg: 16px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
}

/* ─── Layout ─────────────────────────────────────────── */

.home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

/* ─── Logo ───────────────────────────────────────────── */

.home-logo {
    margin-bottom: 24px;
    animation: logoFadeIn 0.8s ease-out;
}

.home-logo img {
    border-radius: 24px;
    filter: drop-shadow(0 0 40px rgba(88, 166, 255, 0.15))
            drop-shadow(0 0 80px rgba(240, 192, 64, 0.08));
}

@keyframes logoFadeIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Title ──────────────────────────────────────────── */

.home-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 4px;
    animation: textFadeIn 0.8s ease-out 0.15s both;
}

.home-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 48px;
    animation: textFadeIn 0.8s ease-out 0.3s both;
}

@keyframes textFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Cards ──────────────────────────────────────────── */

.home-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    animation: textFadeIn 0.8s ease-out 0.45s both;
}

.home-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 260px;
    padding: 36px 28px 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.home-card:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(88, 166, 255, 0.08),
                0 0 0 1px rgba(88, 166, 255, 0.15);
}

.home-card:active {
    transform: translateY(-2px);
}

.home-card-icon {
    font-size: 40px;
    margin-bottom: 16px;
    line-height: 1;
}

.home-card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.home-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ─── Google OAuth / Auth Card ───────────────────────── */

.home-auth {
    margin-top: 32px;
    width: 100%;
    max-width: 544px;
    animation: textFadeIn 0.8s ease-out 0.6s both;
}

.auth-card {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.auth-card:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
}

.auth-card.connected {
    cursor: default;
    border-color: #238636;
}

.auth-card.connected:hover {
    border-color: #238636;
    background: var(--bg-secondary);
}

.auth-card.not-configured {
    cursor: default;
    opacity: 0.5;
}

.auth-card.not-configured:hover {
    border-color: var(--border);
    background: var(--bg-secondary);
}

.auth-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
}

.auth-body {
    flex: 1;
    min-width: 0;
}

.auth-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.auth-status {
    flex-shrink: 0;
}

.auth-disconnect {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    font-family: var(--font);
    transition: border-color 0.2s, color 0.2s;
}

.auth-disconnect:hover {
    border-color: #f85149;
    color: #f85149;
}

/* ─── GitHub Footer Link ─────────────────────────────── */

.home-footer {
    margin-top: 32px;
    animation: textFadeIn 0.8s ease-out 0.6s both;
}

.home-github-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
}

.home-github-link:hover {
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

.home-github-link svg {
    opacity: 0.7;
}

.home-github-link:hover svg {
    opacity: 1;
}

/* ─── Responsive ─────────────────────────────────────── */

@media (max-width: 600px) {
    .home-cards {
        flex-direction: column;
        gap: 16px;
    }
    .home-card {
        width: 100%;
        max-width: 320px;
    }
    .home-logo img {
        width: 120px;
        height: 120px;
    }
    .home-title {
        font-size: 28px;
    }
}
