/* ==========================================
   HUB THEME - CENTERED CARD DESIGN
   ========================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #050508;
    --text: #e8e8f0;
    --text-dim: #9a9ab0;
    --text-muted: #55556a;
    --accent: #8b5cf6;
    --accent2: #ec4899;
    --card-bg: rgba(255,255,255,0.04);
    --card-border: rgba(255,255,255,0.08);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    cursor: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background: rgba(139,92,246,0.3);
    color: #fff;
}

/* Custom Cursor */
.cursor-ring {
    width: 28px; height: 28px;
    border: 2px solid rgba(255, 100, 130, 0.7);
    border-radius: 50%;
    position: fixed; pointer-events: none; z-index: 9999;
    transform: translate(-50%,-50%);
    transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s;
    box-shadow: 0 0 12px rgba(255, 100, 130, 0.3);
}
.cursor-dot {
    width: 6px; height: 6px;
    background: #ff6482;
    border-radius: 50%;
    position: fixed; pointer-events: none; z-index: 10000;
    transform: translate(-50%,-50%);
    box-shadow: 0 0 8px rgba(255, 100, 130, 0.6);
}
.cursor-ring.hovering {
    width: 56px; height: 56px;
    border-color: rgba(255, 100, 130, 0.9);
    background: rgba(255, 100, 130, 0.06);
    box-shadow: 0 0 20px rgba(255, 100, 130, 0.4);
}

/* Canvas */
#spaceCanvas {
    position: fixed; inset: 0; z-index: 0;
    pointer-events: none;
}

/* ==========================================
   SCREEN LAYOUT (single viewport)
   ========================================== */
.hub-screen {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 28px 48px;
}

/* ==========================================
   TOP BAR
   ========================================== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding-bottom: 20px;
}

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

.logo-dot {
    width: 28px; height: 28px;
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-dot::after {
    content: '';
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2.5s ease-in-out infinite;
}

.logo-text {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text);
}

.top-nav {
    display: flex;
    gap: 20px;
}

.top-nav a {
    color: var(--text-muted);
    font-size: 18px;
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
}

.top-nav a:hover {
    color: var(--text);
    transform: scale(1.15);
}

/* ==========================================
   MAIN AREA
   ========================================== */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    gap: 48px;
}

/* Title Section - Centered */
.title-section {
    text-align: center;
    overflow: visible;
}

.main-title {
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 16px;
    color: #fff;
    white-space: nowrap;
    padding-right: 8px;
    overflow: visible;
}

.title-accent {
    font-weight: 900;
    font-style: italic;
    background: linear-gradient(135deg, #c4b5fd, #f0abfc, #67e8f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 12px 0 4px;
    display: inline-block;
}

.main-subtitle {
    font-size: 16px;
    color: var(--text-dim);
    line-height: 1.6;
    letter-spacing: 0.3px;
    font-weight: 500;
}

/* ==========================================
   SITE CARDS - CENTERED GRID
   ========================================== */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    max-width: 1100px;
    width: 100%;
}

/* Max 3 columns */
@media (min-width: 1080px) {
    .sites-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.site-card {
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: var(--text);
    padding: 22px 28px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.site-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, transparent 0%, var(--card-accent, rgba(139,92,246,0.05)) 100%);
    opacity: 0;
    transition: opacity 0.35s;
}

.site-card:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.07);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 20px var(--card-accent, rgba(139,92,246,0.1));
}

.site-card:hover::before {
    opacity: 1;
}

.site-card.highlighted {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.08);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15), 0 8px 32px rgba(0,0,0,0.3);
    transform: translateY(-4px) scale(1.02);
}

/* Card Icon */
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
    background: var(--card-accent, var(--accent));
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Card Info */
.card-info {
    flex: 1;
    min-width: 0;
}

.card-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    color: #fff;
}

.card-desc {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status Badge */
.card-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.card-status.live {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.card-status.live .status-dot {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.card-status.dev {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.card-status.dev .status-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    animation: pulse 2.5s ease-in-out infinite;
}

.card-status.offline {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.card-status.offline .status-dot {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ==========================================
   BOTTOM BAR
   ========================================== */
.bottom-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-shrink: 0;
    padding-top: 10px;
    margin-bottom: 10px;
}

.bottom-left {
    flex: 1;
}

.page-indicators {
    display: flex;
    align-items: center;
    gap: 12px;
}

.indicator {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    transition: color 0.3s, transform 0.2s;
    cursor: pointer;
    user-select: none;
}

.indicator:hover {
    color: var(--text-dim);
    transform: scale(1.1);
}

.indicator.active {
    color: var(--text);
    position: relative;
}

.indicator.active::before {
    content: '';
    position: absolute;
    left: -2px;
    top: -6px;
    right: -2px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.bottom-center {
    flex: 1;
    text-align: center;
}

.stats-mini {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stats-mini strong {
    color: var(--text);
    font-weight: 800;
}

.stat-dot {
    width: 3px; height: 3px;
    background: var(--text-muted);
    border-radius: 50%;
}

.bottom-right {
    flex: 1;
    text-align: right;
}

.brand-mark {
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.brand-mark small {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Entrance animations */
.main-title {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease 0.2s forwards;
}

.main-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease 0.4s forwards;
}

.site-card {
    opacity: 0;
    transform: translateY(25px);
}

.site-card:nth-child(1) { animation: fadeUp 0.6s ease 0.5s forwards; }
.site-card:nth-child(2) { animation: fadeUp 0.6s ease 0.65s forwards; }
.site-card:nth-child(3) { animation: fadeUp 0.6s ease 0.8s forwards; }
.site-card:nth-child(4) { animation: fadeUp 0.6s ease 0.95s forwards; }
.site-card:nth-child(5) { animation: fadeUp 0.6s ease 1.1s forwards; }
.site-card:nth-child(6) { animation: fadeUp 0.6s ease 1.25s forwards; }

.top-bar {
    opacity: 0;
    animation: fadeUp 0.6s ease 0s forwards;
}

.bottom-bar {
    opacity: 0;
    animation: fadeUp 0.6s ease 0.7s forwards;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 900px) {
    .cursor-ring, .cursor-dot { display: none; }
    body { cursor: auto; }

    .hub-screen {
        padding: 20px 24px;
    }

    .main-area {
        gap: 32px;
    }

    .main-title {
        font-size: clamp(36px, 10vw, 52px);
    }

    .sites-grid {
        grid-template-columns: 1fr;
    }

    .bottom-bar {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .bottom-left, .bottom-center, .bottom-right {
        text-align: center;
    }
}

@media (max-width: 500px) {
    .main-title {
        font-size: 32px;
    }

    .site-card {
        padding: 16px 20px;
    }

    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .card-name {
        font-size: 16px;
    }

    .card-desc {
        display: none;
    }

    .stats-mini {
        flex-direction: column;
        gap: 4px;
    }

    .stat-dot {
        display: none;
    }
}
