/* 
   GithubRepositoryDownloader
   Professional Theme
   #424874 · #A6B1E1
*/

:root {
    --bg: #424874;
    --bg-light: #4e5488;
    --accent: #A6B1E1;
    --accent-dim: #8b96cc;
    --white: #ffffff;
    --text: #ffffff;
    --text-dim: rgba(255,255,255,0.6);
    --text-muted: rgba(255,255,255,0.4);
    --border: rgba(255,255,255,0.12);
    --radius: 1rem;
}

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

a, u, .modal-close { text-decoration: none !important; }

body, h1, h2, h3, h4, p, span, a, li, code, strong, div, button, label, pre {
    user-select: none;
    -webkit-user-select: none;
}

input, textarea {
    user-select: text;
    -webkit-user-select: text;
}

html { -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Page ── */
.page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Header ── */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    z-index: 10;
    background: rgba(66, 72, 116, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo {
    width: 28px;
    height: 28px;
}

.header-left span {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.social-links a {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
    font-size: 15px;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.1);
}

/* ── Hero ── */
.hero {
    padding: 100px 0 48px;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(166, 177, 225, 0.15);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 100px;
    margin-bottom: 20px;
}

h1 {
    font-family: 'Inter', sans-serif;
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 16px;
}

.hero p {
    font-size: 17px;
    color: var(--text-dim);
    max-width: 460px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Download Section ── */
.download-section {
    padding: 0 0 56px;
}

.input-row {
    display: flex;
    gap: 8px;
}

#url {
    flex: 1;
    padding: 16px 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 15px;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    outline: none;
}

#url::placeholder {
    color: rgba(66, 72, 116, 0.5);
}

button[type="submit"] {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    background: var(--white);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.1s ease;
}

button[type="submit"]:hover {
    background: #e8e8f0;
}

button[type="submit"]:active {
    transform: scale(0.97);
}

.status {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dim);
    min-height: 20px;
}

.status:empty { display: none; }
.status.error { color: #ff8a80; }
.status.success { color: #a5d6a7; }

/* ── Token Toggle ── */
.token-toggle {
    margin-top: 12px;
}

.token-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.15s ease;
}

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

/* ── Token Panel ── */
.token-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
    margin-top: 0;
}

.token-panel.active {
    max-height: 200px;
    opacity: 1;
    margin-top: 16px;
}

.token-input-row {
    display: flex;
    gap: 8px;
}

.token-input-row input {
    flex: 1;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    outline: none;
}

.token-input-row input::placeholder {
    color: rgba(66, 72, 116, 0.5);
}

.token-save {
    padding: 12px 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    background: var(--white);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s ease;
}

.token-save:hover {
    background: #e8e8f0;
}

.token-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.token-meta a {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.token-meta a:hover {
    text-decoration: underline;
}

.token-status {
    font-size: 12px;
    font-weight: 600;
}

.token-status.saved { color: #a5d6a7; }
.token-status.cleared { color: #ff8a80; }

.token-warning {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.5;
}

/* ── Features ── */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 56px;
}

.feature {
    background: var(--bg-light);
    padding: 28px 24px;
}

.feature-num {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 12px;
}

.feature h3 {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
}

.feature p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ── Info ── */
.info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 56px;
}

.info-block {
    background: var(--bg-light);
    padding: 28px 24px;
}

.info-block h4 {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 14px;
}

.info-block ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-block li {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.info-block code {
    background: rgba(166, 177, 225, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--accent);
    font-family: 'Inter', sans-serif;
}

/* ── FAQ ── */
.faq {
    margin-bottom: 56px;
}

.faq h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--bg-light);
    transition: border-color 0.2s ease;
}

.faq-item:hover {
    border-color: rgba(255,255,255,0.2);
}

.faq-item.open {
    border-color: rgba(166, 177, 225, 0.3);
}

.faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    line-height: 1.4;
}

.faq-q span {
    flex: 1;
}

.faq-q svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--accent);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item.open .faq-q svg {
    transform: rotate(180deg);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item.open .faq-a {
    max-height: 300px;
}

.faq-a p {
    padding: 4px 22px 18px;
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.7;
}

.faq-a code {
    background: rgba(166, 177, 225, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--accent);
}

/* ── Footer ── */
footer {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

footer p {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    margin-top: 8px;
}

.footer-link {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.footer-link:hover {
    text-decoration: underline;
}

/* ── Privacy Modal ── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal:target {
    display: flex;
}

.modal-content {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    color: var(--text-dim);
    text-decoration: none;
    text-decoration-line: none;
    line-height: 1;
    transition: color 0.15s ease;
}

.modal-close:hover {
    color: var(--white);
    text-decoration: none;
}

.modal-content h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 16px;
}

.modal-content h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 16px 0 6px;
    color: var(--accent);
}

.modal-content p {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 4px;
}

.modal-content a {
    color: var(--accent);
    text-decoration: none;
}

.modal-content a:hover {
    text-decoration: underline;
}

.modal-content code {
    background: rgba(166, 177, 225, 0.15);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--accent);
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .page { padding: 0 16px; }
    .top-header { padding: 12px 16px; }
    .header-left span { font-size: 12px; }
    .social-links { gap: 0; }
    .social-links a { width: 28px; height: 28px; font-size: 12px; }
    .hero { padding: 80px 0 32px; }
    h1 { font-size: 28px; letter-spacing: -1px; }
    .hero p { font-size: 15px; }
    .badge { font-size: 11px; padding: 5px 12px; }
    .input-row { flex-direction: column; gap: 10px; }
    #url { padding: 14px 16px; font-size: 14px; }
    button[type="submit"] { justify-content: center; width: 100%; padding: 14px; }
    .features { grid-template-columns: 1fr; }
    .feature { padding: 20px 18px; }
    .info { grid-template-columns: 1fr; }
    .info-block { padding: 20px 18px; }
    .faq-q { padding: 14px 16px; font-size: 14px; }
    .faq-a p { padding: 4px 16px 14px; font-size: 13px; }
    .faq h2 { font-size: 18px; }
    .modal-content { padding: 24px 20px; margin: 10px; max-height: 85vh; }
    .modal-content h3 { font-size: 18px; }
    .modal-content p, .modal-content h4 { font-size: 13px; }
    .token-input-row { flex-direction: column; gap: 8px; }
    .token-input-row input { padding: 12px 14px; font-size: 13px; }
    .token-save { width: 100%; justify-content: center; }
}

@media (max-width: 380px) {
    .social-links a { width: 26px; height: 26px; font-size: 11px; }
    h1 { font-size: 24px; }
}
