/* === Reset & Base === */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
    color: #111;
    line-height: 1.6;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #15803d;
    text-decoration-color: #bbf7d0;
    text-underline-offset: 2px;
}

a:hover {
    text-decoration-color: #15803d;
}

/* === Layout === */

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Nav === */

.nav {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    color: #111;
    letter-spacing: -0.3px;
}

.nav-brand-icon {
    width: 26px;
    height: 26px;
}

/* === Main === */

.main {
    flex: 1;
    padding: 64px 0 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* === Footer === */

footer {
    padding: 24px 0;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    color: #aaa;
    font-size: 13px;
}

/* === Logo Pair === */

.logo-pair {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.logo-pair img {
    object-fit: contain;
}

.logo-plus {
    font-size: 20px;
    font-weight: 500;
    color: #aaa;
}

/* === Page Header (shared across pages) === */

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.page-header p {
    color: #555;
    font-size: 16px;
}

.page-logo {
    width: 80px;
    height: auto;
    margin-bottom: 16px;
}

/* === Buttons === */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 32px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: #15803d;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.button:hover {
    border-color: #22c55e;
    background: #f0fdf4;
    color: #15803d;
}

.button-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* === Primary Button === */

.button-primary {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
    height: 52px;
    padding: 0 40px;
    font-size: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(34, 197, 94, 0.15);
}

.button-primary:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1),
        0 6px 16px rgba(34, 197, 94, 0.2);
    transform: translateY(-1px);
}

/* === Error / Info Boxes === */

.error-box {
    margin-top: 24px;
    padding: 16px 24px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    text-align: left;
    max-width: 480px;
}

.error-details {
    margin-top: 8px;
    font-size: 14px;
    opacity: 0.8;
}

.info-box {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
    text-align: left;
    max-width: 480px;
}

.info-box h3 {
    margin-bottom: 12px;
    font-size: 16px;
}

.info-box ul {
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
}

.info-box code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.help-text {
    margin-top: 24px;
    font-size: 14px;
    color: #999;
}

/* === Landing: Hero === */

.hero {
    margin-bottom: 56px;
    max-width: 500px;
}

.hero-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 28px;
}

.hero h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111;
    letter-spacing: -0.8px;
    line-height: 1.2;
}

.hero-sub {
    font-size: 17px;
    color: #666;
    line-height: 1.65;
    margin-bottom: 32px;
}

/* === Landing: Features Grid === */

.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 48px;
    max-width: 560px;
    width: 100%;
}

.feature-card {
    padding: 24px 20px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    text-align: left;
    transition: border-color 0.2s, background 0.2s;
}

.feature-card:hover {
    border-color: #d4d4d4;
    background: #f5f5f5;
}

.feature-icon {
    font-size: 20px;
    margin-bottom: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dcfce7;
    border-radius: 8px;
    color: #16a34a;
}

.feature-card h3 {
    font-size: 14px;
    font-weight: 650;
    margin-bottom: 6px;
    color: #111;
}

.feature-card p {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
}

.feature-card code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
}

/* === Landing: CTA === */

.cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* === GitHub: Select Wrapper === */

.select-wrapper {
    margin: 16px 0;
}

.select-wrapper select {
    padding: 12px 16px;
    font-size: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #222;
    cursor: pointer;
    min-width: 240px;
}

.select-wrapper select:focus {
    border-color: #22c55e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* === GitHub: Repository List === */

.repo-form {
    width: 100%;
    max-width: 560px;
    text-align: left;
}

.repo-list {
    margin-bottom: 24px;
}

.repo-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    background: #fff;
    transition: background 0.15s, border-color 0.15s;
}

.repo-item:hover {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.repo-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #22c55e;
}

.repo-name {
    font-weight: 600;
}

.repo-description {
    width: 100%;
    padding-left: 26px;
    font-size: 14px;
    color: #555;
}

.badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.badge-archived {
    background: #f3f4f6;
    color: #888;
}

.badge-fork {
    background: #eff6ff;
    color: #2563eb;
}

.badge-private {
    background: #fef3c7;
    color: #d97706;
}

/* === Stepper === */

.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0 0;
    gap: 0;
}

.stepper-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stepper-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #d4d4d4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #999;
    background: #fff;
    flex-shrink: 0;
}

.stepper-label {
    font-size: 14px;
    font-weight: 600;
    color: #999;
    white-space: nowrap;
}

.stepper-step--active .stepper-circle {
    border-color: #22c55e;
    background: #22c55e;
    color: #fff;
}

.stepper-step--active .stepper-label {
    color: #111;
}

.stepper-step--completed .stepper-circle {
    border-color: #22c55e;
    background: #22c55e;
    color: #fff;
}

.stepper-step--completed .stepper-label {
    color: #111;
}

.stepper-connector {
    width: 48px;
    height: 2px;
    background: #e5e5e5;
    margin: 0 8px;
    flex-shrink: 0;
}

.stepper-connector--completed {
    background: #22c55e;
}

/* === Responsive === */

@media (max-width: 600px) {
    .main {
        padding: 40px 0 32px;
    }

    .hero-icon {
        width: 56px;
        height: 56px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero-sub {
        font-size: 16px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cta-group {
        flex-direction: column;
        align-items: center;
    }

    .button {
        width: 100%;
        max-width: 280px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .repo-item {
        padding: 10px 12px;
    }

    .stepper-label {
        display: none;
    }

    .stepper-connector {
        width: 24px;
    }
}
