/* /home/dockerfile/www-php/www/assets/css/main.css */

:root {
    --nd-bg: #050608;
    --nd-bg-alt: #0b0f18;
    --nd-accent: #ff2eff;
    --nd-accent-soft: #a976ff;
    --nd-accent-cyan: #27f3ff;
    --nd-text: #f4f4f4;
    --nd-text-muted: #9ea3bd;
    --nd-border: rgba(255, 255, 255, 0.08);
    --nd-radius-lg: 18px;
    --nd-radius-md: 12px;
    --nd-radius-sm: 8px;
    --nd-shadow-soft: 0 0 30px rgba(0, 0, 0, 0.8);
    --nd-shadow-neon: 0 0 24px rgba(255, 46, 255, 0.3);
    --nd-transition-fast: 160ms ease-out;
    --nd-transition-mid: 220ms ease-out;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    color: var(--nd-text);
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #000;
}

body {
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.nd-root {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 배경 이미지 + 그라데이션 */
.nd-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 10% 0%, rgba(255, 46, 255, 0.23) 0, transparent 55%),
        radial-gradient(circle at 92% 100%, rgba(39, 243, 255, 0.2) 0, transparent 55%),
        linear-gradient(135deg, #050608 0, #070b13 45%, #03040a 100%);
    z-index: -3;
}

/* CRT + subtle grid 효과 */
.nd-crt {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        repeating-linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.27),
            rgba(0, 0, 0, 0.27) 1px,
            transparent 1px,
            transparent 3px
        ),
        linear-gradient(
            to right,
            rgba(255, 255, 255, 0.02) 0,
            transparent 1px
        );
    mix-blend-mode: soft-light;
    opacity: 0.45;
}

/* 헤더 */
.nd-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    backdrop-filter: blur(18px);
    background: linear-gradient(
        to bottom,
        rgba(5, 6, 8, 0.96),
        rgba(5, 6, 8, 0.78),
        transparent
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nd-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nd-logo {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nd-logo-main {
    font-family: "Orbitron", monospace;
    font-size: 18px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--nd-accent-cyan);
}

.nd-logo-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--nd-text-muted);
}

.nd-header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nd-nav {
    display: flex;
    gap: 16px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.nd-nav-link {
    position: relative;
    padding-bottom: 4px;
    color: var(--nd-text-muted);
    cursor: pointer;
}

.nd-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--nd-accent), var(--nd-accent-cyan));
    transition: width var(--nd-transition-mid);
}

.nd-nav-link:hover {
    color: var(--nd-text);
}

.nd-nav-link:hover::after {
    width: 100%;
}

/* 버튼 스타일 */
.nd-btn {
    border-radius: 999px;
    font-size: 12px;
    padding: 8px 16px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--nd-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    transition:
        background-color var(--nd-transition-fast),
        border-color var(--nd-transition-fast),
        transform var(--nd-transition-fast),
        box-shadow var(--nd-transition-fast),
        color var(--nd-transition-fast);
}

.nd-btn-primary {
    background: linear-gradient(120deg, var(--nd-accent), var(--nd-accent-cyan));
    color: #050608;
    box-shadow: var(--nd-shadow-neon);
}

.nd-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 32px rgba(255, 46, 255, 0.55);
}

.nd-btn-outline {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(5, 6, 8, 0.7);
}

.nd-btn-outline:hover {
    border-color: var(--nd-accent-cyan);
    box-shadow: 0 0 14px rgba(39, 243, 255, 0.4);
}

.nd-btn-full {
    width: 100%;
}

/* 유저 영역 */
.nd-user-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nd-user-greeting {
    font-size: 12px;
    color: var(--nd-text-muted);
}

.nd-user-nickname {
    color: var(--nd-accent-cyan);
}

/* 메인 */
.nd-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 16px 48px;
}

/* 섹션 공통 */
.nd-section {
    margin-bottom: 48px;
    background: radial-gradient(circle at top left, rgba(255, 46, 255, 0.14), transparent 45%);
    border-radius: var(--nd-radius-lg);
    padding: 28px 24px 32px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--nd-shadow-soft);
    backdrop-filter: blur(18px);
    position: relative;
    overflow: hidden;
}

.nd-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.02);
    mix-blend-mode: soft-light;
}

.nd-section-title {
    font-family: "Orbitron", monospace;
    font-size: 18px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0 0 8px;
    color: var(--nd-accent-cyan);
}

.nd-section-subtitle {
    margin: 0 0 20px;
    font-size: 13px;
    color: var(--nd-text-muted);
}

/* 섹션 상단 좌/우 정렬 헤더 */
.nd-section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
}

.nd-section-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Hero */
.nd-hero {
    display: block;
    min-height: 260px;
}

.nd-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.3fr);
    gap: 24px;
}

.nd-hero-content {
    max-width: 720px;
}

.nd-hero-kicker {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--nd-text-muted);
    margin: 0 0 6px;
}

.nd-hero-title {
    margin: 0 0 14px;
}

.nd-hero-title-line {
    display: block;
    font-family: "Orbitron", monospace;
}

.nd-hero-title-line:first-child {
    font-size: 14px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--nd-accent-soft);
}

.nd-hero-title-line:last-child {
    font-size: 28px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nd-hero-subtitle {
    font-size: 14px;
    color: var(--nd-text-muted);
    line-height: 1.7;
    margin: 0 0 18px;
}

.nd-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.nd-hero-btn {
    font-size: 11px;
}

.nd-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.nd-pill {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 11px;
    padding: 4px 10px;
    color: var(--nd-text-muted);
}

.nd-pill-soft {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(8, 10, 16, 0.75);
}

/* Hero status row */
.nd-hero-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 6px;
}

.nd-hero-status-item {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 8, 16, 0.95);
    font-size: 11px;
}

.nd-hero-status-label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--nd-text-muted);
    margin-bottom: 3px;
}

.nd-hero-status-value {
    font-size: 12px;
    color: var(--nd-text);
}

/* Hero 오른쪽 패널 */
.nd-hero-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nd-hero-panel-card {
    padding: 12px 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(39, 243, 255, 0.3);
    background: radial-gradient(circle at top, rgba(39, 243, 255, 0.14), rgba(5, 6, 8, 0.96));
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.85);
    font-size: 12px;
}

.nd-hero-panel-card-alt {
    border-color: rgba(255, 46, 255, 0.3);
    background: radial-gradient(circle at top, rgba(255, 46, 255, 0.18), rgba(5, 6, 10, 0.96));
}

.nd-hero-panel-label {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--nd-text-muted);
    margin: 0 0 4px;
}

.nd-hero-panel-title {
    font-size: 14px;
    margin: 0 0 6px;
}

.nd-hero-panel-body {
    font-size: 12px;
    color: var(--nd-text-muted);
    margin: 0 0 8px;
}

.nd-hero-panel-link {
    font-size: 11px;
    color: var(--nd-accent-cyan);
    text-decoration: none;
}

.nd-hero-panel-link:hover {
    text-decoration: underline;
}

/* Portal 레이아웃 */
.nd-portal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
    gap: 24px;
    align-items: flex-start;
}

.nd-portal-intro {
    padding-right: 4px;
}

.nd-portal-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    font-size: 13px;
    color: var(--nd-text-muted);
}

.nd-portal-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.nd-portal-list li span {
    font-size: 16px;
}

.nd-portal-note {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: rgba(6, 8, 16, 0.95);
    font-size: 12px;
}

.nd-portal-note-label {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--nd-text-muted);
    margin: 0 0 4px;
}

.nd-portal-note-body {
    margin: 0;
    color: var(--nd-text-muted);
}

.nd-portal-note-body span {
    color: var(--nd-accent-cyan);
}

.nd-portal-right {
    min-width: 0;
}

/* Portal 카드 그리드 */
.nd-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.nd-card {
    background: rgba(5, 6, 8, 0.86);
    border-radius: var(--nd-radius-md);
    padding: 16px 16px 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    transition:
        transform var(--nd-transition-mid),
        box-shadow var(--nd-transition-mid),
        border-color var(--nd-transition-mid),
        background var(--nd-transition-mid);
}

.nd-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at top right, rgba(39, 243, 255, 0.16), transparent 60%);
    opacity: 0;
    transition: opacity var(--nd-transition-mid);
}

.nd-card:hover {
    transform: translateY(-3px);
    border-color: rgba(39, 243, 255, 0.6);
    box-shadow: 0 0 24px rgba(39, 243, 255, 0.32);
    background: rgba(8, 10, 16, 0.95);
}

.nd-card:hover::before {
    opacity: 1;
}

.nd-card-disabled {
    opacity: 0.6;
    cursor: default;
}

.nd-card-disabled:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.nd-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.nd-card-title {
    font-size: 15px;
    margin: 0;
}

.nd-card-tag {
    font-size: 10px;
    border-radius: 999px;
    padding: 3px 8px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--nd-text-muted);
}

.nd-card-tag-online {
    border-color: rgba(39, 243, 255, 0.75);
    color: var(--nd-accent-cyan);
}

.nd-card-tag-wip {
    border-color: rgba(255, 184, 0, 0.8);
    color: #ffda7b;
}

.nd-card-body {
    font-size: 13px;
    color: var(--nd-text-muted);
    margin: 0 0 12px;
}

.nd-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.nd-card-btn {
    font-size: 11px;
    padding-inline: 14px;
}

.nd-card-meta {
    font-size: 11px;
    color: var(--nd-text-muted);
}

/* Dev log */
.nd-log-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(220px, 0.9fr);
    gap: 20px;
    align-items: flex-start;
}

.nd-log-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nd-log-item {
    padding: 12px 14px;
    border-radius: var(--nd-radius-md);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    background: rgba(8, 10, 16, 0.96);
}

.nd-log-meta {
    font-size: 11px;
    color: var(--nd-accent-soft);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.nd-log-date {
    opacity: 0.9;
}

.nd-log-tag {
    color: var(--nd-text-muted);
}

.nd-log-title {
    font-size: 14px;
    margin: 0 0 4px;
}

.nd-log-body {
    font-size: 13px;
    color: var(--nd-text-muted);
    margin: 0;
}

/* Dev log sidebar */
.nd-log-sidebar {
    border-radius: var(--nd-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: radial-gradient(circle at top, rgba(39, 243, 255, 0.17), rgba(5, 6, 8, 0.98));
    padding: 12px 14px 14px;
    font-size: 12px;
}

.nd-log-sidebar-title {
    font-size: 13px;
    margin: 0 0 8px;
}

.nd-log-sidebar-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}

.nd-log-sidebar-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
}

.nd-log-sidebar-list .label {
    font-size: 11px;
    color: var(--nd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.nd-log-sidebar-list .value {
    font-size: 12px;
}

.nd-log-sidebar-note {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--nd-text-muted);
}

/* About */
.nd-about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.nd-about-title {
    font-size: 14px;
    margin: 0 0 6px;
}

.nd-about-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--nd-text-muted);
}

/* Roadmap */
.nd-roadmap {
    margin-top: 4px;
    padding: 10px 12px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: rgba(6, 8, 16, 0.96);
}

.nd-roadmap-title {
    font-size: 13px;
    margin: 0 0 8px;
}

.nd-roadmap-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    font-size: 13px;
    color: var(--nd-text-muted);
}

.nd-roadmap-list li {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.nd-roadmap-list li span {
    color: var(--nd-accent-cyan);
}

/* Footer */
.nd-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 16px 24px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--nd-text-muted);
}

.nd-footer-meta {
    opacity: 0.8;
}

/* 모달 */
.nd-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 4, 8, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
}

.nd-modal {
    width: 100%;
    max-width: 360px;
    background: radial-gradient(circle at top, rgba(255, 46, 255, 0.25), rgba(5, 6, 10, 0.96));
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 38px rgba(0, 0, 0, 0.9);
    padding: 18px 18px 16px;
    position: relative;
}

.nd-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    color: var(--nd-text-muted);
    font-size: 18px;
    cursor: pointer;
}

.nd-modal-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
}

.nd-modal-tab {
    flex: 1;
    font-size: 11px;
    padding: 8px 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(5, 6, 8, 0.9);
    color: var(--nd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    cursor: pointer;
    transition:
        background var(--nd-transition-fast),
        color var(--nd-transition-fast),
        border-color var(--nd-transition-fast);
}

.nd-modal-tab-active {
    background: linear-gradient(120deg, var(--nd-accent), var(--nd-accent-cyan));
    color: #050608;
    border-color: transparent;
}

.nd-modal-body {
    font-size: 13px;
}

.nd-form {
    display: none;
}

.nd-form-active {
    display: block;
}

.nd-form-group {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nd-form-group label {
    font-size: 12px;
    color: var(--nd-text-muted);
}

.nd-form-group input {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 7px 10px;
    font-size: 13px;
    background: rgba(5, 6, 8, 0.92);
    color: var(--nd-text);
}

.nd-form-group input:focus {
    outline: none;
    border-color: var(--nd-accent-cyan);
    box-shadow: 0 0 0 1px rgba(39, 243, 255, 0.5);
}

.nd-form-actions {
    margin-top: 12px;
}

.nd-form-message {
    min-height: 18px;
    margin-top: 6px;
    font-size: 12px;
}

.nd-form-message-error {
    color: #ff7f7f;
}

.nd-form-message-success {
    color: #7fffba;
}

/* 반응형 */
@media (max-width: 960px) {
    .nd-header {
        padding-inline: 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nd-header-right {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 12px;
    }

    .nd-main {
        padding-inline: 12px;
    }

    .nd-section {
        padding: 20px 16px 22px;
        margin-bottom: 28px;
    }

    .nd-hero-layout {
        grid-template-columns: 1fr;
    }

    .nd-hero-panel {
        order: -1;
    }

    .nd-hero-title-line:last-child {
        font-size: 24px;
    }

    .nd-portal-layout {
        grid-template-columns: 1fr;
    }

    .nd-log-layout {
        grid-template-columns: 1fr;
    }

    .nd-log-sidebar {
        margin-top: 6px;
    }

    .nd-footer {
        flex-direction: column;
        gap: 4px;
        text-align: left;
    }
}

@media (max-width: 600px) {
    .nd-header {
        gap: 6px;
    }

    .nd-nav {
        font-size: 11px;
        gap: 12px;
    }

    .nd-hero-subtitle {
        font-size: 13px;
    }

    .nd-portal-list {
        font-size: 12px;
    }
}
