:root {
    --bg: #030303;
    --panel: rgba(255, 255, 255, 0.045);
    --panel-strong: rgba(255, 255, 255, 0.075);
    --line: rgba(255, 255, 255, 0.11);
    --text: #ffffff;
    --muted: #9b9b9b;
    --soft: #d0d0d0;
    --gold: #f5b82e;
    --gold-soft: #ffd86b;
    --danger: #ff6b6b;
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-body,
.admin-body {
    min-height: 100vh;
    overflow-x: hidden;
}

.ambient {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(150px);
}

.ambient-one {
    top: -18rem;
    left: -16rem;
    width: min(46rem, 85vw);
    height: min(46rem, 85vw);
    background: rgba(245, 184, 46, 0.16);
}

.ambient-two {
    right: -20rem;
    bottom: -22rem;
    width: min(54rem, 95vw);
    height: min(54rem, 95vw);
    background: rgba(148, 92, 15, 0.24);
}

.site-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 2rem);
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(18px);
}

.brand-mini,
.install-head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-mini span:last-child {
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 950;
    letter-spacing: 0.08em;
}

.top-actions,
.admin-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.language-switcher,
.admin-nav {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    padding: 0.25rem;
}

.lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    min-height: 2.25rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: 180ms ease;
}

.lang-link:hover,
.lang-link.is-active {
    color: #000;
    background: var(--gold-soft);
}

.admin-shortcut,
.ghost-btn,
.primary-btn,
.danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 0;
    border-radius: 999px;
    min-height: 2.7rem;
    padding: 0 1.1rem;
    font-weight: 900;
    cursor: pointer;
    transition: 180ms ease;
}

.admin-shortcut,
.ghost-btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.admin-shortcut:hover,
.ghost-btn:hover {
    border-color: rgba(255, 216, 107, 0.5);
    color: var(--gold-soft);
}

.primary-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    color: #050505;
    box-shadow: 0 0 30px rgba(245, 184, 46, 0.22);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 46px rgba(245, 184, 46, 0.32);
}

.primary-btn.full,
.ghost-btn.full {
    width: 100%;
}

.primary-btn.small,
.ghost-btn.small {
    min-height: 2.3rem;
    padding: 0 0.9rem;
    font-size: 0.85rem;
}

.danger-btn {
    min-height: 2.35rem;
    padding: 0 0.85rem;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.22);
    color: #ffb4b4;
}

.danger-btn:hover {
    border-color: rgba(255, 107, 107, 0.55);
}

.public-shell {
    position: relative;
    z-index: 2;
    width: min(100%, 880px);
    margin: 0 auto;
    padding: clamp(2.2rem, 5vw, 5rem) clamp(1rem, 4vw, 2rem);
}

.hero-section {
    min-height: calc(100vh - 6rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.logo-wrap {
    display: grid;
    place-items: center;
    width: clamp(11rem, 28vw, 16rem);
    height: clamp(11rem, 28vw, 16rem);
    margin-inline: auto;
    border: 4px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: #000;
    box-shadow: 0 0 52px rgba(245, 184, 46, 0.16);
    overflow: hidden;
}

.profile-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
}

.generated-logo {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--gold-soft);
    border-radius: inherit;
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 216, 107, 0.18), transparent 34%),
        #050505;
}

.generated-logo span {
    font-size: clamp(3.8rem, 11vw, 6rem);
    line-height: 1;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.generated-logo small {
    margin-top: 0.6rem;
    color: rgba(255, 216, 107, 0.72);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.22em;
}

.hero-section h1 {
    max-width: 850px;
    margin: 2.8rem 0 0;
    font-size: clamp(3rem, 9vw, 6rem);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-subtitle {
    max-width: 650px;
    margin: 1.5rem auto 0;
    color: var(--soft);
    font-size: clamp(1.15rem, 3vw, 1.65rem);
    line-height: 1.35;
}

.save-button {
    margin-top: 3rem;
    padding: 2px;
    border-radius: 1.45rem;
    background: linear-gradient(110deg, var(--accent-a), var(--accent-b));
    color: #fff;
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    font-weight: 950;
    letter-spacing: 0.16em;
    box-shadow: 0 0 44px rgba(245, 184, 46, 0.32);
}

.save-button span {
    display: block;
    padding: 1.25rem 2rem;
    border-radius: 1.32rem;
    background: #000;
}

.save-button:hover span {
    background: #0d0d0d;
}

.about-section {
    margin-top: 4rem;
    padding: clamp(1.5rem, 5vw, 3rem);
    border: 1px solid var(--line);
    border-radius: clamp(1.5rem, 5vw, 2.5rem);
    background: rgba(255, 255, 255, 0.026);
    backdrop-filter: blur(16px);
}

.about-section h2 {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 950;
    letter-spacing: 0.06em;
}

.section-line {
    width: 4rem;
    height: 2px;
    margin: 1.6rem 0;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.about-section p {
    margin: 0;
    color: var(--soft);
    font-size: clamp(1rem, 2.3vw, 1.22rem);
    line-height: 1.85;
    font-weight: 550;
}

.links-section {
    margin-top: 5rem;
}

.gradient-title {
    margin: 0 0 2rem;
    text-align: center;
    font-size: clamp(2rem, 6vw, 3.1rem);
    line-height: 1.05;
    font-weight: 950;
    background: linear-gradient(100deg, var(--accent-a), var(--accent-b));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.link-list {
    display: grid;
    gap: 1rem;
}

.presence-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: clamp(0.85rem, 2.8vw, 1.25rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.6rem;
    background: rgba(255, 255, 255, 0.04);
    transition: 180ms ease;
}

.presence-link:hover {
    transform: translateX(8px);
    border-color: rgba(255, 216, 107, 0.32);
    background: rgba(255, 255, 255, 0.075);
}

[dir="rtl"] .presence-link:hover {
    transform: translateX(-8px);
}

.presence-copy {
    min-width: 0;
    flex: 1;
}

.presence-copy strong,
.presence-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.presence-copy strong {
    font-size: clamp(1.2rem, 3.5vw, 1.9rem);
    line-height: 1.15;
}

.presence-copy small {
    margin-top: 0.4rem;
    color: var(--muted);
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
    font-weight: 700;
}

.arrow {
    color: rgba(255, 255, 255, 0.22);
    font-size: 2.2rem;
}

[dir="rtl"] .arrow {
    transform: rotate(180deg);
}

.site-footer {
    position: relative;
    z-index: 2;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.32);
    text-align: center;
    font-weight: 800;
}

.orbit-mark {
    position: relative;
    display: inline-block;
    width: 3.25rem;
    height: 3.25rem;
    flex: 0 0 auto;
    animation: spin 28s linear infinite;
}

.orbit-mark.center {
    display: block;
    margin: 0 auto 1.4rem;
}

.orbit-mark::before,
.orbit-mark::after,
.orbit-mark span {
    content: "";
    position: absolute;
    inset: 0.45rem;
    border: 1px solid var(--accent-a, var(--gold));
    border-radius: 999px;
    transform: scaleX(0.72) rotate(30deg);
}

.orbit-mark::after {
    border-color: var(--accent-b, var(--gold-soft));
    transform: scaleX(0.72) rotate(90deg);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(4rem, 12vw, 5rem);
    height: clamp(4rem, 12vw, 5rem);
    flex: 0 0 auto;
    border-radius: 1.2rem;
    color: #fff;
    font-size: clamp(1.5rem, 6vw, 2.35rem);
    font-weight: 950;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.icon-badge::before {
    display: block;
}

.icon-whatsapp,
.icon-phone,
.icon-sms {
    background: linear-gradient(180deg, #66fb75 0%, #08b935 100%);
}

.icon-email {
    background: linear-gradient(180deg, #0c63ff 0%, #36dff4 100%);
}

.icon-website,
.icon-address {
    background: #fff;
    color: #1785e8;
}

.icon-instagram {
    background: radial-gradient(circle at 28% 100%, #fed576 0 18%, transparent 34%), linear-gradient(135deg, #405de6, #833ab4 35%, #c13584 55%, #fd1d1d 78%, #fcb045);
}

.icon-tiktok {
    background: #101010;
}

.icon-facebook {
    background: linear-gradient(180deg, #287ff0 0%, #0a62cf 100%);
}

.icon-linkedin {
    background: linear-gradient(180deg, #0b92c7 0%, #0473a8 100%);
}

.icon-whatsapp::before { content: "☎"; }
.icon-phone::before { content: "☎"; }
.icon-sms::before { content: "●"; }
.icon-email::before { content: "✉"; }
.icon-website::before { content: "WWW"; font-size: 0.9rem; letter-spacing: -0.03em; }
.icon-address::before { content: "⌖"; }
.icon-instagram::before { content: "◎"; }
.icon-tiktok::before { content: "♪"; }
.icon-facebook::before { content: "f"; font-size: 3.4rem; line-height: 1; }
.icon-linkedin::before { content: "in"; font-size: 2rem; }

.reveal {
    animation: rise-in 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise-in {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-body {
    background:
        radial-gradient(circle at top left, rgba(245, 184, 46, 0.14), transparent 34rem),
        #030303;
}

.login-shell,
.install-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.login-card,
.install-card {
    width: min(100%, 520px);
    border: 1px solid var(--line);
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: clamp(1.3rem, 5vw, 2.3rem);
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
}

.login-card h1,
.install-card h1 {
    margin: 0 0 1.5rem;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 950;
}

.eyebrow {
    margin: 0 0 0.35rem;
    color: var(--gold-soft);
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.muted,
.muted-link {
    color: var(--muted);
    line-height: 1.6;
}

.muted-link {
    display: block;
    margin-top: 1rem;
    text-align: center;
    font-weight: 800;
}

.muted-link:hover {
    color: var(--gold-soft);
}

.notice {
    margin: 1rem 0;
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    font-weight: 800;
    line-height: 1.5;
}

.notice.success {
    border: 1px solid rgba(78, 222, 128, 0.25);
    background: rgba(78, 222, 128, 0.1);
    color: #bbf7d0;
}

.notice.danger {
    border: 1px solid rgba(255, 107, 107, 0.25);
    background: rgba(255, 107, 107, 0.1);
    color: #fecaca;
}

.install-form,
.login-card,
.admin-form,
.form-section,
.language-box,
.link-editor-card {
    display: grid;
    gap: 1rem;
}

label span {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 850;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0.95rem;
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    outline: 0;
    padding: 0.9rem 1rem;
    transition: 160ms ease;
}

input[type="color"] {
    min-height: 3.25rem;
    padding: 0.35rem;
    cursor: pointer;
}

input[type="file"] {
    padding: 0.8rem;
}

textarea {
    min-height: 9rem;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(255, 216, 107, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 216, 107, 0.08);
}

.button-row {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.4rem 0;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--soft);
}

.check-item span {
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    font-weight: 950;
}

.check-item.ok span {
    background: rgba(78, 222, 128, 0.16);
    color: #86efac;
}

.check-item.bad span {
    background: rgba(255, 107, 107, 0.16);
    color: #fecaca;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
    padding: 0.75rem clamp(1rem, 3vw, 2rem);
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(16px);
}

.admin-logo {
    color: var(--gold-soft);
    font-size: 1.4rem;
    font-weight: 950;
    letter-spacing: 0.14em;
}

.admin-logo span {
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.78rem;
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 36vw);
    min-height: calc(100vh - 4.5rem);
}

.editor-panel {
    padding: clamp(1rem, 3vw, 2rem);
    overflow: auto;
}

.panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.panel-head h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 950;
}

.add-link-form {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.add-link-form select {
    min-width: 170px;
}

.form-section {
    margin-top: 1rem;
    border: 1px solid var(--line);
    border-radius: 1.6rem;
    background: rgba(255, 255, 255, 0.035);
    padding: clamp(1rem, 3vw, 1.5rem);
}

.form-section h2,
.language-box h3,
.nested-language h4 {
    margin: 0;
}

.form-section h2 {
    font-size: 1.35rem;
    font-weight: 950;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
    grid-template-columns: 1.4fr 0.65fr 0.8fr;
    align-items: end;
}

.language-box,
.nested-language {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    background: rgba(0, 0, 0, 0.22);
    padding: 1rem;
}

.language-box h3,
.nested-language h4 {
    color: var(--gold-soft);
    margin-bottom: 0.8rem;
}

.link-editor-list {
    display: grid;
    gap: 1rem;
}

.link-editor-card {
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 1.4rem;
    background: rgba(0, 0, 0, 0.24);
    padding: 1rem;
}

.link-card-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.link-card-head .icon-badge {
    width: 3.7rem;
    height: 3.7rem;
    border-radius: 1rem;
    font-size: 1.6rem;
}

.link-card-head div {
    min-width: 0;
    flex: 1;
}

.link-card-head strong,
.link-card-head small {
    display: block;
}

.link-card-head small {
    color: var(--muted);
    margin-top: 0.25rem;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 3.25rem;
    padding: 0.8rem 0;
}

.check-label input {
    width: auto;
    accent-color: var(--gold);
}

.check-label span {
    margin: 0;
}

.sticky-save {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 1rem 0 0;
    background: linear-gradient(180deg, transparent, #030303 42%);
}

.preview-panel {
    position: sticky;
    top: 4.5rem;
    height: calc(100vh - 4.5rem);
    padding: clamp(1rem, 2vw, 1.5rem);
    border-left: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
}

.preview-frame {
    width: 100%;
    height: 100%;
    border: 8px solid #111;
    border-radius: 2rem;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.preview-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

code {
    color: var(--gold-soft);
}

@media (max-width: 980px) {
    .admin-layout {
        display: block;
    }

    .preview-panel {
        position: relative;
        top: auto;
        height: 760px;
        border-left: 0;
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 720px) {
    .site-topbar,
    .admin-topbar,
    .panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .top-actions,
    .admin-nav,
    .add-link-form {
        width: 100%;
        justify-content: space-between;
    }

    .admin-shortcut,
    .add-link-form select,
    .add-link-form button {
        flex: 1;
    }

    .hero-section {
        min-height: auto;
        padding-top: 2rem;
    }

    .form-grid.two,
    .form-grid.three,
    .check-grid {
        grid-template-columns: 1fr;
    }

    .button-row {
        flex-direction: column;
    }

    .presence-link {
        border-radius: 1.25rem;
    }
}

@media (max-width: 430px) {
    .public-shell {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    .presence-link {
        gap: 0.8rem;
        padding: 0.85rem;
    }

    .save-button {
        width: 100%;
        text-align: center;
    }
}
