/* ============================================
   Neon Candy Blue Dark UI Kit (HYBRID v3)
   - Visual styles: neon-*
   - Interactive widgets: ui-*
============================================ */

/* ---------- Palette ---------- */
:root {
    --neon-blue: #00AFFF;
    --neon-cyan: #00E0FF;
    --mist: #7FE8FF;
    --light: #D9F7FF;
    --graphite: #0A0A0F;
    --carbon: #12141A;
    --blueblack: #0D1A26;
    --neon-lime: #2AFF9C;
    --neon-pink: #FF2EBE;
}

/* ---------- Base / Utilities ---------- */

.neon-body {
    background: radial-gradient(circle at top, #0D1A26 0, #0A0A0F 45%, #000000 100%);
    color: var(--light);
    font-family: "Segoe UI", Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.neon-dark { background: var(--graphite); color: var(--light); }

.neon-container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.neon-section {
    padding: 40px 0;
    
}

.neon-center { text-align: center; }
.neon-right { text-align: right; }
.neon-left { text-align: left; }

.neon-mt-sm { margin-top: 10px; }
.neon-mt { margin-top: 20px; }
.neon-mt-lg { margin-top: 40px; }

/* Fade-in */
.neon-fade {
    opacity: 0;
    animation: neonFadeIn 0.8s ease forwards;
}
@keyframes neonFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Typography ---------- */
.neon-title {
    font-size: 2.4rem;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue), 0 0 25px var(--neon-blue);
    letter-spacing: 1px;
}

.neon-subtitle {
    font-size: 1.1rem;
    color: var(--mist);
    text-shadow: 0 0 6px var(--neon-cyan);
    font-weight: 300;
}

/* ---------- Buttons (Minimal) ---------- */
.neon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: transparent;
    color: var(--neon-blue);
    border: 1px solid #00AFFF66;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: 0.22s ease;
    backdrop-filter: blur(2px);
}

.neon-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 12px #00E0FF44;
}

.neon-btn-primary {
    background: #00AFFF11;
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}
.neon-btn-primary:hover {
    background: #00AFFF22;
    box-shadow: 0 0 15px #00AFFF66;
}

.neon-btn-success {
    border-color: var(--neon-lime);
    color: var(--neon-lime);
}
.neon-btn-success:hover {
    box-shadow: 0 0 15px #2AFF9C55;
}

.neon-btn-danger {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}
.neon-btn-danger:hover {
    box-shadow: 0 0 15px #FF2EBE55;
}

.neon-btn-ghost {
    border-color: #7FE8FF33;
    color: var(--mist);
}
.neon-btn-ghost:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* Sizes */
.neon-btn-sm { padding: 6px 14px; font-size: 0.75rem; }
.neon-btn-lg { padding: 14px 30px; font-size: 0.95rem; }

/* =======================================================
   INTERACTIVE WIDGETS (ui-*)
======================================================= */

/* ---------- TOGGLE ---------- */
.ui-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 44px;
    height: 22px;
    background: #0A0A0F;
    border: 1px solid #00AFFF66;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 0 6px #00AFFF33 inset;
}

.ui-toggle-knob {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue);
    transform: translateX(2px);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.ui-toggle.ui-toggle-on {
    background: #00AFFF22;
    border-color: var(--neon-cyan);
}
.ui-toggle.ui-toggle-on .ui-toggle-knob {
    transform: translateX(22px);
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

/* ---------- TABS ---------- */
.ui-tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #00AFFF33;
    padding-bottom: 6px;
}

.ui-tab {
    padding: 6px 2px;
    cursor: pointer;
    color: var(--mist);
    opacity: 0.75;
    transition: color 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.ui-tab:hover {
    opacity: 1;
    color: var(--neon-blue);
}

.ui-tab.ui-tab-active {
    border-bottom-color: var(--neon-cyan);
    color: var(--neon-cyan);
    opacity: 1;
}

.ui-tab-panel {
    display: none;
    margin-top: 12px;
}
.ui-tab-panel.ui-tab-panel-active {
    display: block;
}

/* ---------- PROGRESS ---------- */
.ui-progress {
    display: block;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #05070A;
    border: 1px solid #00AFFF33;
    overflow: hidden;
}

.ui-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--neon-blue);
    box-shadow: 0 0 12px #00AFFF;
    transition: width 0.4s ease;
}

/* ---------- TOOLTIP ---------- */
.ui-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 4px;
}

.ui-tooltip-bubble {
    position: absolute;
    left: 50%;
    bottom: 130%;
    transform: translateX(-50%) translateY(4px);
    padding: 6px 10px;
    border-radius: 6px;
    background: #0A0A0F;
    border: 1px solid #00AFFF66;
    color: var(--mist);
    font-size: 0.75rem;
    box-shadow: 0 0 12px #00AFFF44;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
}

.ui-tooltip:hover .ui-tooltip-bubble {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------- SKELETON ---------- */
.ui-skeleton {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: #12141A;
    position: relative;
}

.ui-skeleton-wave {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #12141A 0%, #1C212C 50%, #12141A 100%);
    background-size: 200% 100%;
    animation: uiSkeletonWave 1.6s linear infinite;
}

@keyframes uiSkeletonWave {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

/* ---------- ACCORDION ---------- */
.ui-accordion {
    border: 1px solid #00AFFF33;
    border-radius: 8px;
    overflow: hidden;
}

.ui-accordion-item {
    border-bottom: 1px solid #00AFFF22;
}

.ui-accordion-header {
    padding: 12px;
    cursor: pointer;
    color: var(--mist);
    transition: background 0.2s ease, color 0.2s ease;
}

.ui-accordion-header:hover {
    background: #0D1A26;
}

.ui-accordion-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 12px;
    color: #D9F7FFAA;
    transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease;
}

.ui-accordion-item.ui-accordion-active .ui-accordion-body {
    max-height: 200px;
    opacity: 1;
    padding: 12px;
}

/* ---------- Cards ---------- */
.neon-card {
    background: radial-gradient(circle at top left, #151A22 0, #0A0A0F 55%);
    border-radius: 12px;
    border: 1px solid #00AFFF25;
    box-shadow: 0 0 20px #00AFFF33;
    padding: 20px 22px;
    width: auto;
    height: auto;
}

.neon-card-header {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--mist);
    margin-bottom: 10px;
    width: auto;
}

.neon-card-title {
    font-size: 1.4rem;
    color: var(--light);
    margin-bottom: 6px;
    width: auto;
}

.neon-card-body {
    font-size: 0.95rem;
    color: #D9F7FFCC;
    width: auto;
}

.neon-card-footer {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #A8C7DCCC;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: auto;
}

/* ---------- Alerts ---------- */
.neon-alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
    border: 1px solid transparent;
}

.neon-alert-info {
    background: #001725;
    border-color: #00AFFF77;
    box-shadow: 0 0 12px #00AFFF33;
    color: var(--mist);
}

.neon-alert-success {
    background: #021910;
    border-color: #2AFF9C99;
    box-shadow: 0 0 12px #2AFF9C44;
    color: #B7FFD8;
}

.neon-alert-warning {
    background: #241700;
    border-color: #FFC85799;
    box-shadow: 0 0 12px #FFC85744;
    color: #FFE9B0;
}

.neon-alert-danger {
    background: #240012;
    border-color: #FF2EBE99;
    box-shadow: 0 0 12px #FF2EBE44;
    color: #FFC0E7;
}

/* ---------- Badges ---------- */
.neon-badge {
    display: inline-block;
    padding: 3px 9px;
    font-size: 0.75rem;
    border-radius: 999px;
    background: var(--graphite);
    border: 1px solid var(--mist);
    color: var(--mist);
}

.neon-badge-pill {
    border-radius: 999px;
}

.neon-badge-blue { border-color: var(--neon-blue); color: var(--neon-blue); }
.neon-badge-lime { border-color: var(--neon-lime); color: var(--neon-lime); }
.neon-badge-pink { border-color: var(--neon-pink); color: var(--neon-pink); }

/* ---------- Forms ---------- */
.neon-form-group {
    margin-bottom: 15px;
}

.neon-label {
    display: flex-shrink;
    font-size: 0.85rem;
    color: var(--mist);
    margin-bottom: 4px;
}

.neon-input,
.neon-select,
.neon-textarea {
    width: 14rem;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #7FE8FF33;
    background: #05070A;
    color: var(--light);
    font-size: 0.9rem;
    outline: none;
    transition: 0.2s ease;
}

.neon-input:focus,
.neon-select:focus,
.neon-textarea:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px #00E0FF55;
}

.neon-textarea {
    min-height: 80px;
    resize: vertical;
}

/* Grid: responsive 3→2→1 automatically */
.neon-marketplace-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
    box-sizing: border-box;
}

/* Card */
.neon-marketplace-card {
    background: #05070A;
    border: 1px solid #00AFFF33;
    box-shadow: 0 0 18px #00AFFF22;
    border-radius: 12px;
    padding: 18px;
    transition: 0.2s ease;
}

/* Marketplace preview frame */
.neon-marketplace-preview {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #00AFFF22;
    background: #0A0F14;
    margin-bottom: 15px;
}

.neon-marketplace-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Tables ---------- */
.neon-table-wrapper {
    overflow-x: auto;
}

.neon-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    background: #05070A;
    border-radius: 8px;
    overflow: hidden;
}

.neon-table thead {
    background: #0D1A26;
}

.neon-table th,
.neon-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #20222C;
}

.neon-table th {
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    color: var(--mist);
}

.neon-table tbody tr:nth-child(even) {
    background: #090B12;
}

.neon-table tbody tr:hover {
    background: #10141F;
}

/* ---------- Grid Helpers ---------- */
.neon-grid-2,
.neon-grid-3 {
    display: grid;
    gap: 20px;
}

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

/* ---------- Modal ---------- */
.neon-modal-backdrop {
    position: fixed;
    inset: 0;
    background: #000000CC;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.neon-modal {
    background: #05070A;
    border-radius: 12px;
    border: 1px solid #00AFFF66;
    box-shadow: 0 0 24px #00AFFF88;
    width: 90%;
    max-width: 480px;
    padding: 20px 22px;
}

.neon-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.neon-modal-title {
    font-size: 1.1rem;
    color: var(--light);
}

.neon-modal-close {
    background: transparent;
    border: none;
    color: var(--mist);
    cursor: pointer;
    font-size: 1.1rem;
}

.neon-modal-body {
    font-size: 0.9rem;
    color: #D9F7FFCC;
    margin-bottom: 14px;
}

.neon-modal-footer {
    text-align: right;
}

.review-box {
    background:#0A0C10;
    border:1px solid #00AFFF25;
    padding:12px;
    border-radius:8px;
    margin-bottom:12px;
}

.story-strip {
    display:flex;
    overflow-x:auto;
    gap:12px;
    padding:8px 4px;
    scroll-behavior:smooth;
}
.story-strip::-webkit-scrollbar {
    height:6px;
}
.story-strip::-webkit-scrollbar-thumb {
    background:#00AFFF55;
    border-radius:6px;
}

.story-tile {
    flex:0 0 auto;
    width:150px;
    height:150px;
    border-radius:10px;
    border:1px solid #00AFFF33;
    overflow:hidden;
    box-shadow:0 0 12px #00AFFF22;
    cursor:pointer;
    transition:transform 0.2s ease, box-shadow 0.2s ease;
}
.story-tile:hover {
    transform:scale(1.05);
    box-shadow:0 0 18px #00E0FF66;
}
.story-tile img {
    width:100%;
    height:100%;
    object-fit:cover;
}

/* Fullscreen modal */
.gallery-modal {
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.92);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:1000;
}
.gallery-modal.hidden {
    display:none;
}

.gallery-content {
    position:relative;
    max-width:90%;
    max-height:90%;
}
.gallery-content img {
    max-width:100%;
    max-height:100%;
    border-radius:12px;
    border:1px solid #00AFFF66;
    box-shadow:0 0 30px #00AFFF88;
    cursor:pointer;
}

.gallery-nav {
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    font-size:3rem;
    color:#7FE8FF;
    text-shadow:0 0 12px #00E0FF;
    cursor:pointer;
    user-select:none;
    padding:12px;
}
.gallery-nav.left { left:-60px; }
.gallery-nav.right { right:-60px; }

/* ---------- Small Glow Divider ---------- */
.neon-divider {
    height: 1px;
    width: 100%;
    margin: 18px 0;
    background: linear-gradient(90deg, transparent, #00AFFF99, transparent);
}

/* ---------- Layout Container ---------- */
.neon-layout {
    display: flex;
    flex-direction: column; /* pages stack top → bottom */
    margin: 0px;
}

/* ---------- Main Content ---------- */
.neon-main {
    flex-grow: 1;
    padding: 40px 30px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ---------- Footer ---------- */
.neon-footer {
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #666;
}
