@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #07111f;
    --bg-soft: #0c1728;
    --panel: rgba(13, 24, 43, 0.82);
    --panel-strong: #101c31;
    --line: rgba(255, 255, 255, 0.08);
    --text: #ebf2ff;
    --muted: #9eb1cf;
    --brand: #4de2c5;
    --brand-2: #6d8cff;
    --accent: #9a7cff;
    --danger: #ff6b88;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
    --maxw: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 20%, rgba(77, 226, 197, 0.12), transparent 22%),
        radial-gradient(circle at 85% 18%, rgba(109, 140, 255, 0.15), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(154, 124, 255, 0.12), transparent 22%),
        linear-gradient(180deg, #06101c 0%, #08111f 45%, #091220 100%);
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

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

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.glow-1 {
    width: 280px;
    height: 280px;
    background: rgba(77, 226, 197, 0.14);
    top: 80px;
    left: -40px;
}

.glow-2 {
    width: 320px;
    height: 320px;
    background: rgba(109, 140, 255, 0.14);
    right: -60px;
    top: 160px;
}

.container {
    width: min(calc(100% - 32px), var(--maxw));
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(6, 16, 28, 0.72);
    border-bottom: 1px solid var(--line);
}

.nav {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #06111f;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 28px rgba(77, 226, 197, 0.24);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 800;
    font-size: 1rem;
}

.logo-subtitle {
    color: var(--muted);
    font-size: 0.88rem;
}

.menu {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.menu a {
    color: var(--muted);
    font-weight: 500;
}

.menu a:hover {
    color: var(--text);
}

.menu-btn {
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
}

.hero {
    padding: 72px 0 48px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 28px;
    align-items: center;
}

.hero-content,
.hero-panel,
.info-card,
.topic-card,
.member-card,
.cta-box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-content {
    padding: 42px;
}

.tag,
.section-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--brand);
    background: rgba(77, 226, 197, 0.08);
    border: 1px solid rgba(77, 226, 197, 0.18);
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.3rem, 5vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    max-width: 10ch;
}

.hero-text {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 60ch;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.btn {
    min-height: 48px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #07111f;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.btn-secondary {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
}

.hero-panel {
    padding: 24px;
}

.code-window {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #09111d;
    margin-bottom: 18px;
}

.code-top {
    height: 42px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
}

.code-top span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.code-top span:nth-child(1) { background: #ff6b88; }
.code-top span:nth-child(2) { background: #ffd166; }
.code-top span:nth-child(3) { background: #4de2c5; }

.code-window pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-window code {
    font-family: 'JetBrains Mono', monospace;
    color: #cfe1ff;
    line-height: 1.8;
    font-size: 0.95rem;
}

.stat-cards {
    display: grid;
    gap: 14px;
}

.stat-card {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid var(--line);
}

.stat-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.stat-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.section {
    padding: 26px 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 24px;
}

.section-heading h2 {
    margin: 12px 0 12px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.15;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.card-grid {
    display: grid;
    gap: 18px;
}

.card-grid.three {
    grid-template-columns: repeat(3, 1fr);
}

.info-card,
.topic-card,
.member-card {
    padding: 24px;
}

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    font-weight: 800;
    color: #07111f;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.info-card h3,
.topic-card h3,
.member-card h3,
.cta-box h2 {
    margin: 0 0 10px;
}

.info-card p,
.topic-card p,
.member-card p,
.cta-box p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.member-avatar {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-2), var(--accent));
}

.member-role {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--brand);
    font-size: 0.92rem;
    font-weight: 600;
}

.cta-box {
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: linear-gradient(135deg, rgba(77, 226, 197, 0.10), rgba(109, 140, 255, 0.12));
}

.site-footer {
    padding: 40px 0 60px;
}

.footer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.03);
}

.site-footer h3 {
    margin: 0 0 8px;
}

.site-footer p {
    margin: 0;
    color: var(--muted);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
    z-index: 2;
}

.login-card {
    width: min(100%, 460px);
    padding: 32px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.login-card h1 {
    margin: 0 0 12px;
    font-size: 2rem;
}

.login-card p {
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.7;
}

.footer-note {
    color: var(--muted);
}

strong {
    color: var(--text);
}

.profile-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

.profile-summary-card,
.profile-form-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.large-avatar {
    width: 96px;
    height: 96px;
    font-size: 2rem;
    margin-bottom: 18px;
}

.profile-note {
    color: var(--muted);
    line-height: 1.75;
}

.profile-form {
    display: grid;
    gap: 24px;
}

.profile-section-block {
    display: grid;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.profile-section-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-section-block h3 {
    margin: 0;
    font-size: 1.2rem;
}

.profile-field-row {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 16px;
    align-items: start;
}

.profile-field-main,
.profile-field-privacy {
    display: grid;
    gap: 8px;
}

.profile-field-main label,
.profile-field-privacy label {
    font-size: 0.92rem;
    color: var(--text);
    font-weight: 600;
}

.profile-field-main input,
.profile-field-main select,
.profile-field-main textarea,
.profile-field-privacy select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-family: inherit;
    font-size: 0.96rem;
    outline: none;
}

.profile-field-main textarea {
    resize: vertical;
    min-height: 96px;
}

.profile-field-main input::placeholder,
.profile-field-main textarea::placeholder {
    color: var(--muted);
}

.profile-field-main input:focus,
.profile-field-main select:focus,
.profile-field-main textarea:focus,
.profile-field-privacy select:focus {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 3px rgba(109, 140, 255, 0.12);
}

.profile-form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.profile-helper-text {
    color: var(--muted);
    font-size: 0.92rem;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.visibility-inline {
    min-width: 120px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
}

.fixed-visibility-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(77, 226, 197, 0.12);
    border: 1px solid rgba(77, 226, 197, 0.25);
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 700;
}

.single-column {
    grid-template-columns: 1fr;
}

.repeatable-block {
    display: grid;
    gap: 14px;
}

.repeatable-list {
    display: grid;
    gap: 14px;
}

.repeatable-item {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
}

.repeatable-subfield {
    display: grid;
    gap: 8px;
}

.repeatable-subfield label {
    font-size: 0.92rem;
    font-weight: 600;
}

.repeatable-subfield input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-family: inherit;
    font-size: 0.96rem;
    outline: none;
}

.repeatable-subfield input:focus {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 3px rgba(109, 140, 255, 0.12);
}

.add-item-btn,
.remove-item-btn {
    width: fit-content;
}

.remove-item-btn {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    cursor: pointer;
}

.remove-item-btn:hover {
    transform: translateY(-1px);
}

.readonly-input {
    opacity: 0.85;
    cursor: not-allowed;
}

.private-badge {
    background: rgba(154, 124, 255, 0.12);
    border: 1px solid rgba(154, 124, 255, 0.25);
    color: var(--accent);
}

.profile-view {
    display: grid;
    gap: 24px;
}

/*.view-item {*/
/*    display: grid;*/
/*    gap: 8px;*/
/*    padding: 14px 16px;*/
/*    border: 1px solid rgba(255,255,255,0.06);*/
/*    border-radius: 14px;*/
/*    background: rgba(255,255,255,0.025);*/
/*}*/

/*.view-label {*/
/*    font-size: 0.88rem;*/
/*    font-weight: 700;*/
/*    color: var(--brand);*/
/*    letter-spacing: 0.02em;*/
/*    text-transform: uppercase;*/
/*}*/

/*.view-value {*/
/*    color: #d7e3f8;*/
/*    line-height: 1.8;*/
/*    word-break: break-word;*/
/*    font-size: 0.98rem;*/
/*}*/

/*.view-value {*/
/*    color: #ff4da6 !important;*/
/*    background: yellow !important;*/
/*    padding: 6px 8px !important;*/
/*    border: 2px solid red !important;*/
/*    line-height: 1.8;*/
/*    word-break: break-word;*/
/*    font-size: 1.05rem;*/
/*}*/

.view-item {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    background: rgba(255,255,255,0.025);
}

.view-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.view-value {
    color: #b7c9e6;
    line-height: 1.8;
    word-break: break-word;
    font-size: 1rem;
}

.profile-empty-text {
    color: var(--muted);
    margin: 0;
}

.profile-form-card .profile-section-block {
    gap: 18px;
}

.profile-field-main select,
.profile-field-privacy select,
.visibility-inline {
    background-color: #0f1b31;
    color: #ebf2ff;
    border: 1px solid rgba(255,255,255,0.10);
}

.profile-field-main select option,
.profile-field-privacy select option,
.visibility-inline option {
    background-color: #0f1b31;
    color: #ebf2ff;
}

.profile-field-main input[type="date"] {
    color-scheme: dark;
}

.date-input-wrap {
    position: relative;
}

.date-input-wrap input[type="date"] {
    width: 100%;
    padding-right: 48px;
}

.date-input-wrap .custom-date-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.9;
}

.date-input-wrap input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 0;
    width: 48px;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.member-directory-card {
    display: block;
    transition: 0.2s ease;
}

.member-directory-card:hover {
    transform: translateY(-4px);
    border-color: rgba(109, 140, 255, 0.28);
}

.directory-meta {
    color: var(--muted);
    margin: 0 0 12px;
    line-height: 1.6;
}

.member-directory-card {
    display: block;
    transition: 0.2s ease;
}

.member-directory-card:hover {
    transform: translateY(-4px);
    border-color: rgba(109, 140, 255, 0.28);
}

.products-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: end;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.products-filter-group {
    display: grid;
    gap: 8px;
    min-width: 220px;
}

.products-filter-group label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

.products-filter-group select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-family: inherit;
    font-size: 0.96rem;
}

.products-filter-group select option {
    background: #0f1b31;
    color: var(--text);
}

.products-filter-actions {
    display: flex;
    align-items: end;
}

.product-category-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand);
    background: rgba(77, 226, 197, 0.08);
    border: 1px solid rgba(77, 226, 197, 0.18);
    margin-bottom: 12px;
}

.points-total-box {
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.03);
}

.points-total-label {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.points-total-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--brand);
}

.points-history-list {
    display: grid;
    gap: 14px;
}

@media (max-width: 980px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-field-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .hero-grid,
    .card-grid.three {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 30px;
    }

    .cta-box,
    .footer-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero h1 {
        max-width: none;
    }
}

@media (max-width: 720px) {
    .nav {
        padding: 14px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .menu {
        width: 100%;
        justify-content: space-between;
    }

    .hero {
        padding-top: 40px;
    }

    .hero-content,
    .hero-panel {
        padding: 22px;
    }

    .hero h1 {
        font-size: 2.4rem;
    }
}