:root {
    --c-primary: #1B3C35;
    --c-accent: #0aa355;
    --c-bg: #030806;
    --c-text: #ffffff;
    --c-muted: rgba(255, 255, 255, 0.4);
    --f-main: 'Outfit', sans-serif;
    --f-accent: 'Playfair Display', serif;
    --ease-lux: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--f-main);
    background-color: var(--c-bg);
    color: var(--c-text);
    overflow-x: hidden;
}

i {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
}

/* --- Loader --- */
.loader-wrap {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-content {
    text-align: center;
    width: 300px;
}

.portal-id {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 5px;
    color: var(--c-accent);
    margin-bottom: 20px;
}

.loader-bar {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--c-accent);
}

.loader-status {
    margin-top: 15px;
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--c-muted);
}

/* --- Portal UI --- */
.portal-main {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#portal-canvas-container {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.portal-header {
    padding: 40px 6vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    text-decoration: none;
    color: var(--c-text);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.glass-btn {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 25px;
    border-radius: 100px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--c-accent);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 20px;
    border-radius: 100px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--c-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--c-accent);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.2);
    }
}

.status-msg {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Hero Section */
.portal-hero {
    padding: 4vw 6vw;
    flex: 1;
}

.hero-top {
    text-align: center;
    margin-bottom: 80px;
}

.hero-tag {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 5px;
    color: var(--c-accent);
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--f-accent);
    font-size: 5vw;
    line-height: 1;
    margin-bottom: 25px;
    background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0.5));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 14px;
    color: var(--c-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Directory Layout */
.portal-directory {
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-top: 50px;
}

.cat-title {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--c-accent);
    margin-bottom: 30px;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 20px;
}

.cat-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(10, 163, 85, 0.3), transparent);
}

.dir-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.dir-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.4s var(--ease-lux);
    backdrop-filter: blur(20px);
}

.dir-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--c-accent);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: rgba(10, 163, 85, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-accent);
    font-size: 20px;
    transition: all 0.4s;
}

.dir-card:hover .card-icon {
    background: var(--c-accent);
    color: white;
    transform: rotate(10deg);
}

.card-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 700;
}

.card-info p {
    font-size: 11px;
    color: var(--c-muted);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.portal-footer {
    padding: 60px 6vw;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.portal-footer p {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--c-muted);
    font-weight: 900;
}

/* Responsiveness */
@media (max-width: 1200px) {
    .dir-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .dir-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 8vw;
    }
}

@media (max-width: 600px) {
    .dir-grid {
        grid-template-columns: 1fr;
    }
}