/* RESET & FONTS */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --bg-color: #050505;
    --primary-color: #0f0;
    /* Terminal Green */
    --secondary-color: #0a0;
    /* Darker Green */
    --accent-color: #ffb000;
    /* Amber */
    --text-color: #e0e0e0;
    --dim-color: #444;
    --scanline-color: rgba(0, 0, 0, 0.5);
    --glass-color: rgba(16, 32, 16, 0.95);
    --border-color: #0f0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--primary-color);
    font-family: 'VT323', monospace;
    font-size: 18px;
    line-height: 1.4;
    overflow-x: hidden;
    height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    cursor: block;
}

/* CRT & OVERLAY EFFECTS */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 999;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(0, 255, 0, 0.1);
    opacity: 0.4;
    animation: scanline 6s linear infinite;
    pointer-events: none;
    z-index: 1000;
}

canvas#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.2;
}

/* LAYOUT STRUCTURE */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.box {
    border: 2px solid var(--border-color);
    background: var(--glass-color);
    padding: 15px;
    box-shadow: 0 0 10px var(--secondary-color);
    position: relative;
}

.box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--border-color);
    border-left: 2px solid var(--border-color);
}

.box::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid var(--border-color);
    border-right: 2px solid var(--border-color);
}

/* HEADER */
.site-header {
    text-align: center;
}

.logo {
    font-family: monospace;
    font-size: 14px;
    white-space: pre;
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
    margin: 0;
    overflow: hidden;
}

.lang-flags {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    padding: 5px;
    z-index: 100;
}

.lang-flag {
    width: 20px;
    height: 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    opacity: 0.7;
}

.lang-flag:hover,
.lang-flag.selected {
    transform: scale(1.2);
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
    opacity: 1;
}

.marquee-container {
    background: var(--primary-color);
    color: var(--bg-color);
    overflow: hidden;
    white-space: nowrap;
    margin-top: 10px;
    border: 1px solid var(--primary-color);
    font-weight: bold;
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 15s linear infinite;
}

/* GRID LAYOUT */
.main-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    flex: 1;
}

@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* SIDEBAR */
.sidebar {
    font-size: 16px;
}

.banner-carousel {
    position: relative;
    width: 100%;
    height: 40px;
    overflow: hidden;
    border: 1px solid var(--dim-color);
    background: #000;
    margin-top: 10px;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}



.section-title {
    margin-top: 0;
    border-bottom: 1px dashed var(--primary-color);
    padding-bottom: 5px;
    color: var(--accent-color);
    text-shadow: 0 0 2px var(--accent-color);
}

.status-list {
    list-style: none;
    padding: 0;
}

.status-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.recruitment-box .small-text {
    font-size: 14px;
    margin: 5px 0;
    color: var(--dim-color);
}

.contact-list {
    list-style: none;
    padding: 0;
    font-size: 14px;
}

.contact-list li {
    margin-bottom: 5px;
}

.highlight {
    color: var(--accent-color);
    text-shadow: 0 0 2px var(--accent-color);
}

.value.ok {
    color: var(--primary-color);
}

.value.danger {
    color: #f00;
    text-shadow: 0 0 3px #f00;
}

.value.blinking {
    animation: blink 1s step-end infinite;
}

.divider {
    border: 0;
    border-bottom: 1px dotted var(--dim-color);
    margin: 15px 0;
}

.node-map {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    text-align: center;
}

.node {
    cursor: help;
    border: none;
    background: transparent;
}

.node.active {
    color: var(--primary-color);
}

.node.warning {
    color: var(--accent-color);
}

.node.error {
    color: #f00;
}

/* TERMINAL */
.terminal-window {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    border: 2px solid #fff;
    box-shadow: 0 0 5px #fff;
}

.terminal-bar {
    background: #fff;
    color: #000;
    padding: 2px 5px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin: -15px -15px 10px -15px;
    /* Pull to edges */
    border-bottom: 1px solid #fff;
    font-family: 'Courier New', Courier, monospace;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
}

.terminal-input-line {
    display: flex;
    align-items: center;
}

.prompt {
    color: var(--primary-color);
    margin-right: 5px;
}

#terminal-input {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    flex: 1;
    outline: none;
    caret-color: var(--primary-color);
}

/* SKILLS & TABLES */
.skills-panel {
    margin-top: 20px;
}

.retro-table {
    width: 100%;
    border-collapse: collapse;
}

.retro-table th,
.retro-table td {
    border: 1px solid var(--dim-color);
    padding: 5px;
    text-align: left;
}

.retro-table th {
    background: rgba(0, 255, 0, 0.1);
    color: var(--accent-color);
}

.bar-container {
    width: 100%;
    background: #222;
    height: 10px;
    border: 1px solid var(--dim-color);
}

.bar {
    background: var(--primary-color);
    height: 100%;
    box-shadow: 0 0 5px var(--primary-color);
}

/* MEMBERS GRID */
.members-panel {
    margin-top: 20px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.member-card {
    border: 1px solid var(--dim-color);
    padding: 10px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    background: transparent;
}

.member-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--secondary-color);
    transform: none;
}

.member-avatar {
    width: 100%;
    height: auto;
    border-bottom: 2px solid var(--dim-color);
    margin-bottom: 10px;
    filter: grayscale(100%) sepia(100%) hue-rotate(90deg) saturate(300%);
    transition: filter 0.3s;
    border: none;
}

.member-card:hover .member-avatar {
    filter: none;
}

/* Greenlight Effect */
.member-card.active::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
    animation: pulse-green 2s infinite;
}

/* Leader Indicator */
.member-card.leader {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
}

.member-card.leader::after {
    content: '★ LEADER';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-color);
    color: var(--accent-color);
    padding: 0 5px;
    border: 1px solid var(--accent-color);
    font-size: 10px;
    text-shadow: 0 0 5px var(--accent-color);
}

.member-info h4 {
    margin: 5px 0;
    color: var(--text-color);
}

.member-info span {
    font-size: 12px;
    color: var(--dim-color);
    display: block;
}

/* Ex-Member (Left) */
.member-card.left {
    opacity: 0.6;
    border-color: #555;
    pointer-events: none;
}

.member-card.left .member-avatar {
    filter: grayscale(100%);
}

.member-card.left::before {
    content: 'X';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    font-size: 100px;
    color: rgba(255, 0, 0, 0.7);
    font-weight: bold;
    text-shadow: 0 0 10px red;
    z-index: 10;
    pointer-events: none;
}

/* ACHIEVEMENTS */
.achievements-panel {
    margin-top: 20px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

.achievement-block h3,
.certs-block h3 {
    margin-top: 0;
    font-size: 16px;
    color: var(--accent-color);
    border-bottom: 1px dashed var(--dim-color);
    display: inline-block;
}

.achievements-list {
    list-style: none;
    padding: 0;
}

.achievements-list li {
    margin-bottom: 5px;
    padding-left: 15px;
    position: relative;
    color: var(--text-color);
}

.achievements-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.htb-rank {
    border: 2px solid var(--primary-color);
    padding: 10px;
    text-align: center;
    background: rgba(0, 255, 0, 0.05);
}

.rank-title {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
    margin: 5px 0;
}

.rank-label {
    font-size: 12px;
    color: var(--dim-color);
    letter-spacing: 2px;
}

.cert-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.cert-tag {
    border: 1px solid var(--primary-color);
    padding: 2px 8px;
    font-size: 14px;
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.cert-tag:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 10px var(--primary-color);
    border-color: var(--primary-color);
}

/* FOOTER */
.site-footer {
    text-align: center;
    font-size: 14px;
    margin-top: auto;
    border: none;
    padding-top: 0;
}

.footer-links a {
    margin: 0 10px;
}

.badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.badge {
    border: 1px solid var(--dim-color);
    padding: 2px 5px;
    font-size: 10px;
    text-transform: uppercase;
    line-height: 1.1;
    color: var(--dim-color);
}

/* ANIMATIONS */
@keyframes scanline {
    0% {
        transform: translateY(-100vh);
    }

    100% {
        transform: translateY(100vh);
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes pulse-green {
    0% {
        opacity: 0.5;
        box-shadow: 0 0 5px var(--primary-color);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 20px var(--primary-color);
    }

    100% {
        opacity: 0.5;
        box-shadow: 0 0 5px var(--primary-color);
    }
}

/* AGGRESSIVE GLITCH EFFECT */
.glitched {
    position: relative;
    color: var(--primary-color);
    animation: none;
}

.glitched::before,
.glitched::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip: rect(0, 900px, 0, 0);
}

.glitched::before {
    left: 2px;
    text-shadow: -1px 0 #0ff;
    animation: glitchTop 1s infinite linear alternate-reverse;
    background: transparent;
    z-index: -1;
}

.glitched::after {
    left: -2px;
    text-shadow: -1px 0 #f0f;
    animation: glitchBottom 1.5s infinite linear alternate-reverse;
    background: transparent;
    z-index: -1;
}

@keyframes glitchTop {
    0% {
        clip: rect(0, 9999px, 5px, 0);
        transform: translate(0);
    }

    10% {
        clip: rect(10px, 9999px, 40px, 0);
        transform: translate(-2px, -2px);
    }

    100% {
        clip: rect(0, 9999px, 5px, 0);
        transform: translate(0);
    }
}

@keyframes glitchBottom {
    0% {
        clip: rect(80px, 9999px, 100px, 0);
        transform: translate(0);
    }

    50% {
        clip: rect(60px, 9999px, 70px, 0);
        transform: translate(2px, -2px);
    }

    100% {
        clip: rect(80px, 9999px, 100px, 0);
        transform: translate(0);
    }
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid var(--dim-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border: 1px solid #000;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}