@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

:root {
    --bg: #05050f;
    --bg-alt: #0e0d22;
    --bg-soft: rgba(255, 255, 255, 0.05);
    --card: rgba(15, 16, 36, 0.75);
    --card-border: rgba(255, 255, 255, 0.2);
    --text: #f3f4ff;
    --muted: #b1b3c9;
    --accent: #7f5dff;
    --accent-2: #4dd9ff;
    --outline: rgba(255, 255, 255, 0.4);
}

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

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(127, 93, 255, 0.2), transparent 35%),
        radial-gradient(circle at 20% 40%, rgba(77, 217, 255, 0.18), transparent 40%),
        linear-gradient(180deg, #05050f 0%, #0b0b1b 45%, #060611 100%);
    color: var(--text);
    line-height: 1.6;
    padding-bottom: 3rem;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 20px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 55%);
    pointer-events: none;
    opacity: 0.65;
    z-index: 0;
}

body.dark-mode {
    background: radial-gradient(circle at top left, rgba(127, 93, 255, 0.15), transparent 25%),
        radial-gradient(circle at 25% 30%, rgba(77, 217, 255, 0.12), transparent 35%),
        linear-gradient(180deg, #050412 0%, #04030c 60%, #050410 100%);
}

body.dark-mode::before {
    opacity: 0.6;
}

header {
    position: relative;
    padding: 2.75rem 1rem 2rem;
    text-align: left;
    z-index: 1;
}

.link-hub {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 1rem;
}

.link-hub-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 25px 45px rgba(5, 5, 15, 0.45);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    backdrop-filter: blur(28px);
}

.link-hub-label {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.link-hub-panel h2 {
    margin-top: 0.25rem;
    font-size: clamp(1.4rem, 2vw, 1.7rem);
    color: #fff;
}

.link-hub-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.link-hub-search {
    flex: 1;
    min-width: 220px;
}

.link-hub-sort {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.link-hub-sort label {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.65);
}

.link-hub-sort select {
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 16, 36, 0.8);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.link-hub-input {
    flex: 1;
    min-width: 220px;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(15, 16, 36, 0.8);
    color: #fff;
    font-size: 0.95rem;
}

.link-hub-helper {
    color: var(--muted);
    font-size: 0.88rem;
}

.link-hub-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.65rem;
    max-height: 220px;
    overflow: auto;
    padding-right: 0.5rem;
}

.featured-generator {
    margin-top: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(160deg, rgba(124, 211, 255, 0.12), rgba(15, 16, 36, 0.75));
    box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.04);
}

.featured-generator h3 {
    margin: 0;
    font-size: 1.2rem;
}

.featured-generator p {
    margin: 0.35rem 0;
    color: rgba(255, 255, 255, 0.77);
    font-size: 0.95rem;
}

.featured-generator .featured-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-2);
    text-decoration: none;
}

.featured-generator .featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
}

.recommended-section {
    max-width: 1200px;
    margin: 1.5rem auto 2rem;
    padding: 0 1.5rem;
}

.recommended-section-header {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.recommended-section-label {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.recommended-section-header h2 {
    margin-top: 0.35rem;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    letter-spacing: -0.02em;
}

.recommended-filter {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.recommended-filter button {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, border 0.25s ease;
}

.recommended-filter button.active {
    background: rgba(127, 93, 255, 0.2);
    border-color: rgba(127, 93, 255, 0.6);
}

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.recommended-card {
    border-radius: 16px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(5, 5, 15, 0.8);
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.recommended-card h3 {
    font-size: 1.05rem;
    margin: 0;
}

.recommended-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
}

.recommended-tag {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.recommended-empty {
    color: var(--muted);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

.recommended-card:hover {
    transform: translateY(-3px);
    border-color: rgba(127, 93, 255, 0.6);
    box-shadow: 0 15px 30px rgba(5, 5, 15, 0.4);
}

.link-hub-item {
    display: block;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(5, 5, 15, 0.7);
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.link-hub-item:hover {
    transform: translateY(-2px);
    border-color: rgba(127, 93, 255, 0.6);
}

.link-hub-empty {
    font-size: 0.9rem;
    color: var(--muted);
    grid-column: 1 / -1;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
    position: relative;
}

.header-main h1 {
    font-size: clamp(2.6rem, 3vw, 3.2rem);
    letter-spacing: -0.03em;
    margin-bottom: 0.45rem;
}

.last-run-indicator {
    font-size: 0.95rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.last-run-indicator a {
    color: var(--accent-2);
    text-decoration: underline;
}

.header-main p {
    font-size: 1.05rem;
    color: var(--muted);
}

.header-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.header-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    box-shadow: 0 14px 30px rgba(7, 7, 20, 0.45);
    backdrop-filter: blur(14px);
}

.header-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(7, 7, 20, 0.55);
    opacity: 0.9;
}

.main-panel {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    padding: 1.75rem;
    box-shadow: 0 30px 60px rgba(5, 5, 15, 0.55);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    backdrop-filter: blur(20px);
    transition: transform 0.35s ease, border-color 0.35s ease;
}

.card:hover {
    transform: translateY(-7px);
    border-color: rgba(127, 93, 255, 0.5);
}

.card h2 {
    font-size: 1.4rem;
    color: #fff;
}

.result {
    background: var(--bg-soft);
    border-radius: 16px;
    padding: 1.25rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text);
    font-size: 1rem;
    border: 1px solid transparent;
    transition: border 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result::after {
    content: '';
    position: absolute;
}

.result span {
    color: var(--muted);
}

.color-result {
    flex-direction: column;
    gap: 1rem;
}

.color-preview {
    width: 100%;
    height: 90px;
    border-radius: 18px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    transition: border-color 0.3s ease;
}

.controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.controls input,
.controls select {
    flex: 1;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 16, 36, 0.9);
    color: #fff;
    font-size: 0.98rem;
}

.controls button {
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    box-shadow: 0 12px 26px rgba(7, 7, 20, 0.4);
    backdrop-filter: blur(14px);
}

.controls button:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 32px rgba(7, 7, 20, 0.45);
    opacity: 0.9;
}

.generate-btn {
    align-self: flex-end;
    padding: 0.9rem 1.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 18px 38px rgba(7, 7, 20, 0.5);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    backdrop-filter: blur(12px);
}

.generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 40px rgba(7, 7, 20, 0.6);
    opacity: 0.9;
}

button:focus-visible,
.header-btn:focus-visible,
.card-link:focus-visible {
    outline: 2px solid rgba(77, 217, 255, 0.8);
    outline-offset: 4px;
}

.card-link {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(127, 93, 255, 0.75);
    align-self: flex-start;
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-link:hover {
    color: var(--accent-2);
}

.link-only-home .card {
    min-height: auto;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.link-only-home .result,
.link-only-home .controls,
.link-only-home .generate-btn {
    display: none;
}

.link-only-home .card-link {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.25rem;
    color: var(--accent-2);
}

.link-only-home .card h2 {
    font-size: 1.15rem;
    margin-bottom: 0.2rem;
}

.generator-page {
    max-width: 900px;
    margin: 0 auto;
    display: block;
}

.generator-meta {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.generator-meta p {
    color: var(--muted);
    font-size: 1rem;
}

.generator-page-actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}

.notification {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    background: rgba(15, 16, 36, 0.9);
    color: #fff;
    padding: 0.9rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(5, 5, 15, 0.65);
    opacity: 0;
    transform: translateY(60px);
    transition: transform 0.4s ease, opacity 0.4s ease;
    z-index: 1000;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

body.dark-mode .card {
    border-color: rgba(127, 93, 255, 0.4);
    box-shadow: 0 25px 55px rgba(1, 1, 10, 0.8);
}

body.dark-mode .controls input,
body.dark-mode .controls select {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

body.dark-mode .notification {
    background: rgba(32, 32, 58, 0.95);
}

body.dark-mode .card-link {
    color: rgba(127, 93, 255, 0.9);
}

body.dark-mode .generate-btn {
    background: linear-gradient(135deg, rgba(127, 93, 255, 0.9), rgba(77, 217, 255, 0.8));
    box-shadow: 0 18px 32px rgba(5, 5, 15, 0.7);
}

@media (max-width: 768px) {
    header {
        padding-top: 2rem;
    }

    .header-controls {
        flex-direction: column;
        width: 100%;
    }

    .header-btn {
        width: 100%;
        text-align: center;
    }


    .link-hub-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .link-hub-sort {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .link-hub-sort select {
        width: 40%;
    }

    .container {
        grid-template-columns: 1fr;
        padding: 0 1rem 3rem;
    }

    .controls {
        flex-direction: column;
    }

    .controls input,
    .controls select,
    .controls button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1.25rem;
    }

    .header-main h1 {
        font-size: 2rem;
    }
}


footer { margin-top: 3rem; padding: 1.5rem 1rem 2rem; text-align: center; color: var(--muted); }
.footer-content { max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }
.footer-about { color: var(--text); max-width: 720px; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--accent-2); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

.consent-banner { position: fixed; bottom: 1rem; left: 1rem; right: 1rem; max-width: 720px; margin: 0 auto; padding: 0.9rem 1rem; background: rgba(0,0,0,0.72); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; box-shadow: 0 15px 40px rgba(0,0,0,0.4); display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; z-index: 20; }
.consent-banner p { margin: 0; color: var(--text); }
.consent-actions { display: flex; gap: 0.5rem; }
.consent-button { background: var(--accent); border: none; color: #fff; padding: 0.55rem 0.9rem; border-radius: 8px; cursor: pointer; }
.consent-button.secondary { background: transparent; border: 1px solid var(--card-border); color: var(--text); }

