/* ============================================================================
   Nexian Global — Server cards (used on /serverdetails and the JourneyModal)
   ============================================================================ */

.sd-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-block: var(--space-6);
}
@media (min-width: 640px) { .sd-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .sd-grid { grid-template-columns: repeat(3, 1fr); } }

.sd-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(165deg, rgba(38, 28, 18, 0.72) 0%, rgba(18, 14, 9, 0.80) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--gold-rgb), 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(var(--gold-rgb), 0.1);
    transition: transform var(--dur-base) var(--ease-out),
                border-color var(--dur-base) var(--ease-out),
                box-shadow var(--dur-base) var(--ease-out);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    cursor: pointer;
}
.sd-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--gold-rgb), 0.55);
}
.sd-card.coming-soon {
    opacity: 0.65;
    background: linear-gradient(165deg, rgba(14, 11, 8, 0.75) 0%, rgba(8, 6, 4, 0.85) 100%);
    border-color: rgba(60, 50, 40, 0.3);
    cursor: default;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(80, 70, 55, 0.08);
}
.sd-card.coming-soon::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: var(--radius);
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(30, 24, 16, 0.35) 10px,
        rgba(30, 24, 16, 0.35) 13px
    );
}
.sd-card.coming-soon:hover { transform: none; }

.sd-card .top-shimmer {
    position: absolute;
    top: 0; right: 2rem; left: 2rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--gold-rgb), 0.45), transparent);
    pointer-events: none;
}

.sd-card.primary {
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.12),
                0 8px 32px rgba(0, 0, 0, 0.45),
                inset 0 1px 0 rgba(245, 158, 11, 0.14);
}

.sd-card .prime-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: #F59E0B;
    background: linear-gradient(90deg,
        rgba(245, 158, 11, 0) 0%,
        rgba(245, 158, 11, 0.18) 20%,
        rgba(245, 158, 11, 0.22) 50%,
        rgba(245, 158, 11, 0.18) 80%,
        rgba(245, 158, 11, 0) 100%);
    border-bottom: 1px solid rgba(245, 158, 11, 0.25);
}
.sd-card .prime-badge .dot {
    width: 4px; height: 4px;
    border-radius: var(--radius-full);
    background: #F59E0B;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
}

.sd-card-body {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    flex: 1;
}

.sd-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    min-height: 4.5rem;
}

.sd-status-dot {
    margin-top: 0.5rem;
    flex-shrink: 0;
    position: relative;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: var(--radius-full);
}
.sd-status-dot.online { background: #34D399; }
.sd-status-dot.online::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    background: #34D399;
    opacity: 0.6;
    animation: pulse-soft 2s ease-in-out infinite;
}
.sd-status-dot.offline { background: rgba(82, 82, 91, 1); }

.sd-card-name {
    font-family: var(--font-inter), sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(var(--gold-rgb), 0.5);
    margin-bottom: 0.25rem;
}
.sd-card.coming-soon .sd-card-name { color: rgba(100, 90, 70, 0.85); }

.sd-card-subtitle {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.3;
    color: #EDD98A;
}
.sd-card.coming-soon .sd-card-subtitle { color: #3e3424; }

.sd-card-desc {
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-top: 0.375rem;
    color: rgba(190, 170, 130, 0.85);
}
.sd-card.coming-soon .sd-card-desc { color: rgba(90, 80, 60, 0.85); }

.sd-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: var(--space-4);
    min-height: 1.75rem;
}
.sd-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.125rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}
.sd-pill.day {
    background: rgba(var(--gold-rgb), 0.08);
    border: 1px solid rgba(var(--gold-rgb), 0.3);
    color: var(--gold-400);
}
.sd-pill.phase-normal {
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #34D399;
}
.sd-pill.phase-artifact {
    background: linear-gradient(135deg, rgba(40, 10, 10, 0.95) 0%, rgba(60, 15, 15, 0.9) 100%);
    border: 1px solid rgba(248, 113, 113, 0.5);
    color: #FCA5A5;
    animation: glow-pulse 2.4s ease-in-out infinite;
}
.sd-pill.phase-launching {
    background: rgba(59, 130, 246, 0.10);
    border: 1px solid rgba(59, 130, 246, 0.40);
    color: #93C5FD;
}

/* Launching status dot — blue with the same soft pulse as the live dot. */
.sd-status-dot.launching { background: #60A5FA; }
.sd-status-dot.launching::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    background: #60A5FA;
    opacity: 0.6;
    animation: pulse-soft 2.6s ease-in-out infinite;
}

/* Launching grid-card variant — blue accent border + navy gradient bg */
.sd-card.launching {
    border-color: rgba(59, 130, 246, 0.45);
    background: linear-gradient(165deg, rgba(20, 28, 48, 0.78) 0%, rgba(10, 14, 26, 0.88) 100%);
    box-shadow:
        0 0 22px rgba(59, 130, 246, 0.10),
        0 8px 32px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(96, 165, 250, 0.12);
    /* Override the .coming-soon dim from the sealed branch — launching is selectable. */
    opacity: 1;
}
.sd-card.launching:hover {
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow:
        0 8px 30px rgba(59, 130, 246, 0.20),
        0 24px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(96, 165, 250, 0.20);
}

/* In-card countdown block (replaces the live-stats grid on launching cards) */
.sd-launch-box {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    padding: 0.875rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    border-radius: var(--radius-md);
    background:
        radial-gradient(ellipse at 50% 60%, rgba(59, 130, 246, 0.08) 0%, transparent 75%),
        rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(96, 165, 250, 0.22);
}
.sd-launch-label {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(147, 197, 253, 0.85);
}
.sd-launch-val {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    color: #DBEAFE;
    text-shadow: 0 0 14px rgba(96, 165, 250, 0.55), 0 0 28px rgba(59, 130, 246, 0.22);
    min-width: 9ch;
    text-align: center;
}
.sd-launch-val.tba {
    font-size: 1rem;
    color: rgba(191, 219, 254, 0.85);
    text-shadow: none;
    letter-spacing: 0.18em;
}

/* Detail-panel header chip when viewing a launching world (replaces "Join Server"). */
.sd-launch-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.40);
    color: #93C5FD;
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.sd-launch-chip-val {
    color: #DBEAFE;
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.sd-card hr.sd-divider {
    height: 1px;
    border: 0;
    margin-bottom: var(--space-4);
    background: linear-gradient(90deg, transparent, rgba(var(--gold-rgb), 0.2), transparent);
}

.sd-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    min-height: 5rem;
}
.sd-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
}
.sd-stat.players  { border: 1px solid rgba(var(--gold-rgb), 0.2);  box-shadow: 0 0 12px rgba(var(--gold-rgb), 0.06); }
.sd-stat.online   { border: 1px solid rgba(52, 211, 153, 0.2);     box-shadow: 0 0 12px rgba(52, 211, 153, 0.06); }
.sd-stat.speed    { border: 1px solid rgba(248, 113, 113, 0.2);    box-shadow: 0 0 12px rgba(248, 113, 113, 0.06); }
.sd-stat-icon { margin-bottom: 0.25rem; }
.sd-stat.players .sd-stat-icon  { color: var(--gold-400); }
.sd-stat.online  .sd-stat-icon  { color: #34D399; }
.sd-stat.speed   .sd-stat-icon  { color: #F87171; }
.sd-stat-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1;
    margin-bottom: 0.25rem;
}
.sd-stat.players .sd-stat-value { color: var(--gold-400); text-shadow: 0 0 14px rgba(var(--gold-rgb), 0.6); }
.sd-stat.online  .sd-stat-value { color: #34D399; text-shadow: 0 0 14px rgba(52, 211, 153, 0.6); }
.sd-stat.speed   .sd-stat-value { color: #F87171; text-shadow: 0 0 14px rgba(248, 113, 113, 0.6); }
.sd-stat-label {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 500;
}
.sd-stat.players .sd-stat-label { color: rgba(var(--gold-rgb), 0.7); }
.sd-stat.online  .sd-stat-label { color: rgba(52, 211, 153, 0.85); }
.sd-stat.speed   .sd-stat-label { color: rgba(248, 113, 113, 0.85); }

.sd-coming-soon-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
    height: 5.5rem;
    animation: pulse-soft 3s ease-in-out infinite;
}
.sd-coming-soon-box .icon-wrap {
    width: 2.75rem; height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: linear-gradient(145deg, rgba(55, 44, 30, 0.9) 0%, rgba(28, 22, 14, 0.95) 100%);
    border: 1px solid rgba(100, 82, 50, 0.4);
    color: rgba(140, 110, 60, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(120, 95, 55, 0.2);
}
.sd-coming-soon-label {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: rgba(120, 113, 108, 1);
}

.sd-view-details {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(var(--gold-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: rgba(154, 130, 85, 0.85);
}

/* ─── Detail panel (expanded view per server) ─────────────────────────── */

.sd-detail {
    margin-top: var(--space-6);
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(160deg, rgba(22, 16, 10, 0.82) 0%, rgba(12, 9, 6, 0.88) 100%);
    border: 1px solid rgba(var(--gold-rgb), 0.2);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(var(--gold-rgb), 0.1);
}
.sd-detail-head {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.sd-detail-head h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 0.12em;
    color: var(--gold-200);
}
.sd-detail-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) { .sd-detail-body { grid-template-columns: repeat(2, 1fr); } }

.sd-section {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(var(--gold-rgb), 0.08);
    border-top-color: rgba(var(--gold-rgb), 0.35);
    background: linear-gradient(160deg, rgba(32, 24, 12, 0.85) 0%, rgba(22, 16, 8, 0.9) 100%);
    box-shadow: inset 0 1px 0 rgba(var(--gold-rgb), 0.08),
                inset 0 2px 12px rgba(0, 0, 0, 0.35),
                0 4px 12px rgba(0, 0, 0, 0.3);
}
.sd-section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(8, 6, 2, 0.4) 100%);
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.sd-section-icon {
    width: 1.5rem; height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(var(--gold-rgb), 0.08);
    border: 1px solid rgba(var(--gold-rgb), 0.18);
    color: rgba(var(--gold-rgb), 0.6);
    flex-shrink: 0;
}
.sd-section-title {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #C9A84C;
    flex: 1;
}
.sd-section-body { padding: 1rem; }

.sd-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: 0.625rem;
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.07);
}
.sd-row:last-child { border-bottom: none; }
.sd-row-label {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(154, 130, 85, 0.85);
}
.sd-row-value {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    color: #E8D9B0;
    text-shadow: 0 0 12px rgba(var(--gold-rgb), 0.35);
}

/* ─── Horizontal timeline ─────────────────────────────────────────────── */
.sd-timeline {
    position: relative;
    padding: 0.75rem 0.5rem 0.25rem;
}
.sd-timeline-track {
    position: absolute;
    top: 1.25rem;
    right: 1rem;
    left: 1rem;
    height: 6px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 2px 6px rgba(0, 0, 0, 0.5);
}
.sd-timeline-row { display: flex; justify-content: space-between; gap: 0.5rem; }
.sd-tl-event {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.sd-tl-node {
    position: relative;
    z-index: 2;
    width: 1.25rem; height: 1.25rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, rgba(30, 24, 14, 0.95) 0%, rgba(18, 14, 6, 0.98) 100%);
    border: 1px solid rgba(var(--gold-rgb), 0.18);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}
.sd-tl-node .inner {
    width: 0.5rem; height: 0.5rem;
    border-radius: var(--radius-full);
    background: rgba(var(--gold-rgb), 0.12);
}
.sd-tl-event.current .sd-tl-node {
    background: linear-gradient(135deg, #34D399 0%, #059669 100%);
    border-color: transparent;
    box-shadow: 0 0 14px rgba(52, 211, 153, 0.5), 0 0 4px rgba(52, 211, 153, 0.7);
}
.sd-tl-event.current .sd-tl-node .inner { background: rgba(255, 255, 255, 0.9); }
.sd-tl-event.current .sd-tl-node::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    background: #34D399;
    opacity: 0.4;
    animation: pulse-soft 1.5s ease-in-out infinite;
}
.sd-tl-event.past .sd-tl-node {
    background: linear-gradient(135deg, var(--gold-400) 0%, #9A7515 100%);
    border-color: transparent;
    box-shadow: 0 0 12px rgba(var(--gold-rgb), 0.45), 0 0 4px rgba(var(--gold-rgb), 0.6);
}
.sd-tl-event.past .sd-tl-node .inner { background: rgba(22, 16, 6, 0.7); }

.sd-tl-label {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(154, 130, 85, 0.85);
    line-height: 1.2;
}
.sd-tl-event.current .sd-tl-label { color: #34D399; text-shadow: 0 0 10px rgba(52, 211, 153, 0.4); }
.sd-tl-event.past    .sd-tl-label { color: var(--gold-400); text-shadow: 0 0 10px rgba(var(--gold-rgb), 0.3); }

.sd-tl-date {
    font-size: 0.8125rem;
    margin-top: 0.125rem;
    color: rgba(154, 130, 85, 0.85);
}
.sd-tl-event:not(.future) .sd-tl-date { color: rgba(154, 130, 85, 0.85); }
