/*
 * OASIS NETWORK – PORTAL STYLES
 * Dark Theme, Glassmorphism, Orange Accent
 */

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

:root {
    /* Core Colors */
    --bg:           #080b18;
    --bg-mid:       #0d1025;
    --bg-card:      #111628;
    --sidebar-bg:   #0a0d1e;
    --sidebar-width: 70px;

    /* Accent */
    --accent:       #FFB84C;
    --accent-dim:   rgba(255, 184, 76, 0.15);
    --accent-glow:  rgba(255, 184, 76, 0.35);

    /* Text */
    --text:         #f0f2ff;
    --text-muted:   #6b7280;
    --text-dim:     #374151;

    /* Glass */
    --glass:        rgba(13, 16, 37, 0.7);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-blur:   16px;

    /* Misc */
    --radius:       14px;
    --radius-sm:    8px;
    --trans:        0.25s ease;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
}

/* ================================================
   LAYOUT – Portal Shell
   ================================================ */

.portal-shell {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ================================================
   SIDEBAR
   ================================================ */

.portal-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100%;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0 20px;
    gap: 0;
    z-index: 100;
    position: relative;
}

/* Logo at top */
.sidebar-logo {
    width: 42px;
    height: 42px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: transform var(--trans), filter var(--trans);
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

.sidebar-logo:hover {
    transform: scale(1.1) rotate(-5deg);
    filter: drop-shadow(0 0 12px var(--accent));
}

/* Nav items */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    flex: 1;
}

.nav-item {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--trans);
    color: var(--text-muted);
    font-size: 1.15rem;
    background: transparent;
    border: none;
    outline: none;
}

.nav-item:hover {
    background: var(--accent-dim);
    color: var(--accent);
    transform: translateY(-1px);
}

.nav-item.active {
    background: var(--accent-dim);
    color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-glow), inset 0 0 16px var(--accent-dim);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

/* Disabled / coming soon items */
.nav-item.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-item.disabled:hover {
    background: transparent;
    color: var(--text-muted);
    transform: none;
}

/* Tooltip */
.nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.nav-item:hover::after {
    opacity: 1;
}

/* Divider between nav groups */
.sidebar-divider {
    width: 30px;
    height: 1px;
    background: var(--glass-border);
    margin: 10px 0;
}

/* Bottom section */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* ================================================
   CONTENT AREA
   ================================================ */

.portal-content {
    flex: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: var(--bg);
}

/* Each page fills the content area */
.page {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Map page: iframe should fill */
.page.map-page {
    overflow: hidden;
}

.map-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Scrollbar */
.page::-webkit-scrollbar { width: 6px; }
.page::-webkit-scrollbar-track { background: transparent; }
.page::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

/* ================================================
   DASHBOARD PAGE
   ================================================ */

.dashboard-page {
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: var(--bg);
    min-height: 100%;
}

/* Hero Banner */
.hero-banner {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    padding: 40px 48px;
    border: 1px solid var(--glass-border);
    background: linear-gradient(120deg, #0d0f1f 0%, #111523 40%, #171b2e 100%);
}

.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 50%, rgba(255,184,76,0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(59,130,246,0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* Animated glowing orbs */
.hero-banner::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    animation: float-orb 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, 20px); }
}

.hero-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    z-index: 1;
}

.hero-logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 20px var(--accent-glow));
    animation: logo-pulse 4s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { filter: drop-shadow(0 0 20px var(--accent-glow)); }
    50%       { filter: drop-shadow(0 0 35px var(--accent)); }
}

.hero-text h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 60%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero-text .hero-sub {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
}

.hero-text .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-glow);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 50px;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Quick Access Buttons on hero */
.hero-actions {
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 12px;
    z-index: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--trans);
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--accent);
    color: #0a0d1e;
}

.btn-primary:hover {
    background: #ffc96a;
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(255,255,255,0.06);
    color: var(--text);
    border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

/* ------------------------------------------------
   Section Header
   ------------------------------------------------ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.section-link {
    font-size: 0.8rem;
    color: var(--accent);
    cursor: pointer;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity var(--trans);
}

.section-link:hover { opacity: 1; }

/* ------------------------------------------------
   Stats Row
   ------------------------------------------------ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--trans), transform var(--trans);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--card-accent, var(--accent)), transparent);
}

.stat-card:hover {
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: var(--card-accent-dim, var(--accent-dim));
    color: var(--card-accent, var(--accent));
    margin-bottom: 4px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 2px;
}

.stat-change.up   { color: #22c55e; }
.stat-change.down { color: #ef4444; }
.stat-change.neutral { color: var(--text-muted); }

/* ------------------------------------------------
   Two-column lower section
   ------------------------------------------------ */
.dashboard-lower {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

/* News / Ankündigungen */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    cursor: pointer;
    transition: all var(--trans);
    position: relative;
    overflow: hidden;
}

.news-card:hover {
    border-color: rgba(255,255,255,0.13);
    transform: translateX(3px);
}

.news-tag {
    flex-shrink: 0;
    margin-top: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
}

.news-body { flex: 1; }

.news-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 4px;
}

.news-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.news-date {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 8px;
    font-weight: 500;
}

/* Apps / Quick Launch */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--trans);
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.app-card:hover {
    border-color: var(--accent-glow);
    background: var(--accent-dim);
    transform: scale(1.02);
}

.app-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.app-card.disabled:hover {
    transform: none;
    border-color: var(--glass-border);
    background: var(--bg-card);
}

.app-icon {
    font-size: 1.5rem;
    color: var(--accent);
}

.app-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.app-card:hover .app-name {
    color: var(--accent);
}

.app-soon-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* ================================================
   TOPBAR (above content)
   ================================================ */

.portal-topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: 50;
}

.topbar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-title i {
    color: var(--accent);
    font-size: 1rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-tag {
    background: var(--accent-dim);
    border: 1px solid var(--accent-glow);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 50px;
}

.topbar-discord {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(88,101,242,0.15);
    border: 1px solid rgba(88,101,242,0.3);
    color: #7289da;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--trans);
}

.topbar-discord:hover {
    background: rgba(88,101,242,0.25);
    box-shadow: 0 0 16px rgba(88,101,242,0.3);
}

/* Offset page content below topbar */
.has-topbar {
    padding-top: 56px;
}

/* ================================================
   FOOTER
   ================================================ */

.portal-footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    height: 36px;
    background: var(--sidebar-bg);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 50;
}

.portal-footer a, .portal-footer span {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color var(--trans);
}

.portal-footer a:hover { color: var(--text-muted); }

.portal-footer .sep { color: rgba(255,255,255,0.06); }

/* ================================================
   ANIMATIONS
   ================================================ */

@keyframes fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.anim-in {
    animation: fade-in 0.4s ease forwards;
}

/* Staggered children */
.anim-stagger > * {
    opacity: 0;
    animation: fade-in 0.4s ease forwards;
}

.anim-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.anim-stagger > *:nth-child(2) { animation-delay: 0.10s; }
.anim-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.anim-stagger > *:nth-child(4) { animation-delay: 0.20s; }
.anim-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.anim-stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-lower { grid-template-columns: 1fr; }
    .hero-actions { position: static; transform: none; margin-top: 20px; }
    .hero-banner { flex-direction: column; align-items: flex-start; padding: 32px; }
}

@media (max-width: 640px) {
    .dashboard-page { padding: 16px; gap: 20px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .apps-grid  { grid-template-columns: 1fr 1fr; }
    .hero-text h1 { font-size: 1.6rem; }
}
