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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #0d1117;
    color: #e6edf3;
    font-size: 16px;
    line-height: 1.6;
}

/* ── Nav ── */
.sc-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 40px;
    border-bottom: 1px solid #21262d;
    position: sticky;
    top: 0;
    background: #0d1117;
    z-index: 100;
}

.sc-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.sc-logo-mark {
    width: 28px;
    height: 28px;
    background: #1f6feb;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sc-logo-name {
    font-size: 15px;
    font-weight: 500;
    color: #f0f6fc;
}

.sc-nav-links {
    display: flex;
    gap: 28px;
}

.sc-nav-links a {
    font-size: 13px;
    color: #8b949e;
    text-decoration: none;
    transition: color 0.15s;
    padding-bottom: 2px;
}

.sc-nav-links a:hover {
    color: #e6edf3;
}

.sc-nav-links a.sc-nav-active {
    color: #f0f6fc;
    border-bottom: 2px solid #58a6ff;
}

.sc-nav-tag {
    font-size: 12px;
    color: #484f58;
}

/* ── Hero ── */
.sc-hero {
    padding: 72px 40px 60px;
    text-align: center;
    border-bottom: 1px solid #21262d;
}

.sc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    color: #58a6ff;
    margin-bottom: 28px;
}

.sc-hero h1 {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.2;
    color: #f0f6fc;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.sc-hero h1 span {
    color: #58a6ff;
}

.sc-hero p {
    font-size: 17px;
    color: #8b949e;
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Quick entry cards ── */
.sc-quick-entries {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.sc-entry-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 14px;
    padding: 20px;
    width: 280px;
    text-align: left;
    transition: border-color 0.15s;
}

.sc-entry-card:hover {
    border-color: #30363d;
}

.sc-entry-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sc-entry-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
}

.sc-entry-name {
    font-size: 15px;
    font-weight: 500;
    color: #f0f6fc;
    margin-bottom: 2px;
}

.sc-entry-ver {
    font-size: 11px;
    color: #484f58;
}

.sc-entry-desc {
    font-size: 13px;
    color: #8b949e;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sc-entry-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.sc-entry-actions {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.sc-entry-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
}

.sc-entry-btn:hover { opacity: 0.85; }

.sc-entry-btn-get {
    background: #1f6feb;
    color: #fff;
}

.sc-entry-btn-get-green {
    background: #1a7340;
}

.sc-entry-btn-view {
    background: #21262d;
    color: #c9d1d9;
    border: 1px solid #484f58;
}

.sc-scroll {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sc-scroll-label {
    font-size: 11px;
    color: #484f58;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sc-scroll-arrow {
    width: 32px;
    height: 32px;
    border: 1px solid #30363d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sc-bounce 2s ease-in-out infinite;
}

.sc-scroll-arrow svg {
    width: 14px;
    height: 14px;
    stroke: #8b949e;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes sc-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50%       { transform: translateY(6px); opacity: 1; }
}

/* ── Apps Section ── */
.sc-apps {
    padding: 56px 40px;
}

.sc-section-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: #58a6ff;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.sc-app-card {
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 24px;
    display: flex;
    align-items: stretch;
}

.sc-app-info {
    padding: 28px;
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid #21262d;
}

.sc-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.sc-app-icon svg {
    width: 24px;
    height: 24px;
}

.sc-app-name {
    font-size: 16px;
    font-weight: 500;
    color: #f0f6fc;
    margin-bottom: 4px;
}

.sc-app-version {
    font-size: 11px;
    color: #484f58;
    margin-bottom: 12px;
}

.sc-app-desc {
    font-size: 13px;
    color: #8b949e;
    line-height: 1.65;
    margin-bottom: 16px;
    flex: 1;
}

.sc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.sc-tag {
    font-size: 11px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 2px 8px;
    color: #8b949e;
}

.sc-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
    color: #fff;
}

.sc-store-btn:hover {
    opacity: 0.85;
    color: #fff;
}

.sc-store-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.sc-screenshots {
    flex: 1;
    background: #0d1117;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sc-screenshot-strip {
    display: flex;
    gap: 12px;
    padding: 20px 20px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #30363d transparent;
    align-items: flex-start;
}

.sc-screenshot-strip::-webkit-scrollbar { height: 4px; }
.sc-screenshot-strip::-webkit-scrollbar-track { background: transparent; }
.sc-screenshot-strip::-webkit-scrollbar-thumb { background: #30363d; border-radius: 2px; }

.sc-screenshot-strip img {
    width: 320px;
    height: auto;
    object-fit: cover;
    object-position: top left;
    border-radius: 6px;
    border: 1px solid #30363d;
    display: block;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.sc-screenshot-strip img:hover {
    border-color: #58a6ff;
}

/* ── Feature row ── */
.sc-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 0 40px 56px;
}

.sc-feat {
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 10px;
    padding: 20px;
}

.sc-feat-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    color: #58a6ff;
}

.sc-feat-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sc-feat h4 {
    font-size: 13px;
    font-weight: 500;
    color: #e6edf3;
    margin-bottom: 6px;
}

.sc-feat p {
    font-size: 12px;
    color: #656d76;
    line-height: 1.6;
}

/* ── Footer ── */
.sc-footer {
    border-top: 1px solid #21262d;
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #484f58;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sc-nav { padding: 12px 20px; }
    .sc-nav-tag { display: none; }
    .sc-hero { padding: 56px 20px 48px; }
    .sc-hero h1 { font-size: 32px; }
    .sc-apps { padding: 40px 20px; }
    .sc-app-card { flex-direction: column; }
    .sc-app-info { width: 100%; border-right: none; border-bottom: 1px solid #21262d; }
    .sc-features { grid-template-columns: 1fr; padding: 0 20px 40px; }
    .sc-footer { flex-direction: column; gap: 8px; text-align: center; padding: 20px; }
}

/* ══ App detail page ══ */
.app-layout {
    display: flex;
    min-height: calc(100vh - 57px);
}

/* Sidebar */
.app-sidebar {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid #21262d;
    padding: 28px 20px;
    position: sticky;
    top: 57px;
    height: calc(100vh - 57px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-sidebar-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #6e7681;
    text-decoration: none;
    transition: color 0.15s;
}

.app-sidebar-back:hover {
    color: #c9d1d9;
}

.app-sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    flex-shrink: 0;
}

.app-sidebar-name {
    font-size: 13px;
    font-weight: 500;
    color: #f0f6fc;
    line-height: 1.3;
}

.app-sidebar-ver {
    font-size: 11px;
    color: #484f58;
    margin-top: 2px;
}

.app-sidebar-store-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #1f6feb;
    color: #fff;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
}

.app-sidebar-store-btn:hover {
    opacity: 0.85;
    color: #fff;
}

.app-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 1px solid #21262d;
    padding-top: 16px;
}

.app-sidebar-link {
    display: block;
    font-size: 13px;
    color: #8b949e;
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.app-sidebar-link:hover {
    color: #e6edf3;
    background: #21262d;
}

.app-sidebar-link-active {
    color: #f0f6fc !important;
    background: #21262d;
}

/* Main content */
.app-main {
    flex: 1;
    padding: 48px 56px;
    max-width: 860px;
}

.app-section {
    margin-bottom: 56px;
    scroll-margin-top: 80px;
}

.app-title {
    font-size: 32px;
    font-weight: 600;
    color: #f0f6fc;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.app-subtitle {
    font-size: 16px;
    color: #58a6ff;
    margin-bottom: 16px;
}

.app-body {
    font-size: 15px;
    color: #8b949e;
    line-height: 1.75;
    margin-bottom: 20px;
}

.app-section-title {
    font-size: 18px;
    font-weight: 500;
    color: #f0f6fc;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #21262d;
}

.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

/* Feature grid */
.app-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.app-feature-card {
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 10px;
    padding: 18px 20px;
}

.app-feature-icon {
    width: 28px;
    height: 28px;
    color: #58a6ff;
    margin-bottom: 10px;
}

.app-feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.app-feature-card h3 {
    font-size: 13px;
    font-weight: 500;
    color: #e6edf3;
    margin-bottom: 6px;
}

.app-feature-card p {
    font-size: 12px;
    color: #656d76;
    line-height: 1.65;
}

.app-feature-card code {
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 11px;
    background: #21262d;
    padding: 1px 5px;
    border-radius: 3px;
    color: #79c0ff;
}

/* Screenshot grid */
.app-screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.app-screenshot-item {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.app-screenshot-item img {
    width: 100%;
    border-radius: 7px;
    border: 1px solid #30363d;
    display: block;
    transition: border-color 0.15s;
}

.app-screenshot-item img:hover {
    border-color: #58a6ff;
}

.app-screenshot-item span {
    font-size: 11px;
    color: #484f58;
    text-align: center;
}

/* Use cases */
.app-usecase-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-usecase-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.app-usecase-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #58a6ff;
    flex-shrink: 0;
    margin-top: 6px;
}

.app-usecase-item strong {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #e6edf3;
    margin-bottom: 5px;
}

.app-usecase-item p {
    font-size: 13px;
    color: #8b949e;
    line-height: 1.65;
    margin: 0;
}

/* Changelog */
.app-changelog {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.app-changelog-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.app-changelog-ver {
    font-size: 12px;
    font-weight: 500;
    color: #58a6ff;
    background: #1a2540;
    border: 1px solid #1f4070;
    border-radius: 5px;
    padding: 3px 10px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.app-changelog-notes {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.app-changelog-notes li {
    font-size: 13px;
    color: #8b949e;
    line-height: 1.6;
    padding-left: 14px;
    position: relative;
}

.app-changelog-notes li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: #484f58;
}

.app-license-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: #8b949e;
    line-height: 1.6;
}
.app-license-note svg { flex-shrink: 0; margin-top: 2px; color: #58a6ff; }
.app-license-note strong { color: #e6edf3; }

/* ── Carousel ── */
.sc-carousel {
    flex: 1;
    background: #010409;
    overflow: hidden;
    position: relative;
    min-height: 240px;
    display: flex;
    align-items: center;
}

.sc-carousel-track {
    display: flex;
    gap: 12px;
    padding: 20px 52px 48px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.sc-carousel-img {
    width: calc(100% - 140px);
    flex-shrink: 0;
    border-radius: 6px;
    border: 1px solid #30363d;
    display: block;
    object-fit: cover;
    object-position: top left;
    transition: border-color 0.15s;
}

.sc-carousel-img:hover {
    border-color: #58a6ff;
}

.sc-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    width: 32px;
    height: 32px;
    background: rgba(13,17,23,0.85);
    border: 1px solid #30363d;
    border-radius: 50%;
    color: #e6edf3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.15s, border-color 0.15s;
}

.sc-carousel-btn:hover {
    background: #21262d;
    border-color: #58a6ff;
}

.sc-carousel-prev { left: 10px; }
.sc-carousel-next { right: 10px; }

.sc-carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.sc-carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #30363d;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.sc-carousel-dot.active {
    background: #58a6ff;
    transform: scale(1.3);
}

/* ── Lightbox ── */
.sc-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(1, 4, 9, 0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.sc-lightbox.active {
    display: flex;
}

.sc-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    border: 1px solid #30363d;
    display: block;
}

.sc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 50%;
    color: #e6edf3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.sc-lightbox-close:hover {
    background: #30363d;
}
