* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-y: auto; /* Enables scrolling so content isn't cut off */
    background: #0f172a;
    padding: 40px 0; /* Adds breathing room at the top and bottom of the page */
}

/* Background Media Layer */
.bg-media {
    position: fixed; /* Fixed so the background stays put while scrolling */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    object-fit: cover;
    object-position: center top;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.bg-media.active {
    opacity: 1;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.25);
    z-index: -1;
}

/* Main Container - margin: auto centers it vertically when it fits, but allows scrolling when it's too long */
.hub-container {
    text-align: center;
    max-width: 1100px;
    width: 90%;
    padding: 2rem;
    z-index: 1;
    margin: auto; /* This cleanly centers it vertically when there's space */
}

.web-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 3rem;
    text-transform: uppercase;

    /* Text color & gradient */
    background: linear-gradient(135deg, #ffffff, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Multi-layered dark shadow & dark text outline to guarantee contrast */
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.95))
            drop-shadow(0 0 25px rgba(15, 23, 42, 0.9));
}

/* Navigation Grid */
.portal-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.portal-card {
    flex: 1;
    min-width: 260px;
    max-width: 320px;
    background: rgba(30, 41, 59, 0.75);
    border: 2px solid rgba(56, 189, 248, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 50px;
    padding: 1.8rem 1.5rem;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.portal-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: #38bdf8;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
    background: rgba(30, 41, 59, 0.9);
}

.portal-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.2);
}

.portal-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.portal-status {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #38bdf8;
}

.portal-card.disabled .portal-status {
    color: #94a3b8;
}

.events-bg {
    object-position: center 35%;
}

/* Circular Return Button */
.circle-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.85);
    border: 2px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    font-size: 1.5rem;
    text-decoration: none;
    margin-bottom: 2rem;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.circle-back-btn:hover {
    transform: scale(1.1);
    background: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
}

