@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Outfit:wght@200;400;600;800&display=swap');

:root {
    --bg-dark: #050505;
    --bg-card: rgba(15, 15, 20, 0.7);
    --primary: #ff4d4d;
    /* Neon Red */
    --accent: #ffcc00;
    /* Gold */
    --text-white: #ffffff;
    --text-dim: #8888b3;
    --glass-border: rgba(255, 255, 255, 0.05);
    --font-gaming: 'Orbitron', sans-serif;
    --font-main: 'Outfit', sans-serif;
    --shadow-glow: 0 0 20px rgba(255, 77, 77, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-main);
    overflow-x: hidden;
    /* --- SECURITY: DISABLE TEXT SELECTION --- */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Background Decorations */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(255, 77, 77, 0.05) 0%, transparent 70%);
    z-index: -1;
}

/* Common Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-gaming);
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Premium Buttons */
.btn-primary {
    background: linear-gradient(45deg, #ff4d4d, #b30000);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-family: var(--font-gaming);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 77, 77, 0.3);
}

/* Card Design - Removed hover side bar */
.member-card::before {
    display: none !important;
}

/* Card Design */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Hierarchy Badges */
/* Adjusted Badges - Compact Version */
.badge {
    font-family: var(--font-gaming);
    font-size: 0.5rem;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 700;
    margin-bottom: 8px;
    display: inline-flex;
    /* Use inline-flex for better alignment control */
    width: fit-content;
    /* Ensure it doesn't stretch */
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Member Card Layouts */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.founder-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
}

.founder-card {
    width: 350px;
    /* Slightly larger for prominence */
    flex-grow: 1;
    max-width: 450px;
}

@media (max-width: 600px) {
    .founder-card {
        width: 100%;
        max-width: 100%;
    }

    .founder-wrap {
        padding: 0 10px;
    }
}

.view-compact .member-grid,
.view-compact .founder-wrap {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.view-compact .member-card {
    padding: 10px;
}

.view-compact .m-img-wrap {
    width: 45px;
    height: 45px;
}

.view-compact .m-name {
    font-size: 0.9rem;
}

.view-compact .badge {
    font-size: 0.4rem;
    padding: 1px 6px;
}

/* Modal Styling - THE BUSINESS CARD */
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(15px);
}

.modal-card {
    width: 720px;
    min-height: 400px;
    padding: 50px;
    background: #08080a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Background Pattern */
.modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.5;
}

.card-glow {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 45%,
            rgba(255, 255, 255, 0.05) 48%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 52%,
            transparent 55%);
    transform: translate(-50%, -50%);
    animation: holoSweep 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes holoSweep {
    0% {
        transform: translate(-70%, -70%) rotate(0deg);
    }

    50% {
        transform: translate(10%, 10%) rotate(5deg);
    }

    100% {
        transform: translate(-70%, -70%) rotate(0deg);
    }
}

.modal-watermark {
    position: absolute;
    bottom: -20px;
    left: -10px;
    font-size: 9rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.015);
    font-family: var(--font-gaming);
    pointer-events: none;
    z-index: 0;
    letter-spacing: -10px;
}

.modal-chip {
    position: absolute;
    top: 40px;
    right: 50px;
    width: 50px;
    height: 38px;
    background: linear-gradient(135deg, #d4af37 0%, #f1d592 50%, #8a6d3b 100%);
    border-radius: 8px;
    opacity: 0.6;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.3);
}

.modal-content-wrap {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    z-index: 1;
}

/* Left Column */
.modal-left {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.id-frame {
    position: relative;
    width: 180px;
    height: 180px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-img {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    object-fit: cover;
    filter: contrast(1.1) brightness(0.9);
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 77, 77, 0.5);
    box-shadow: 0 0 10px var(--primary);
    animation: scanMove 3s linear infinite;
    z-index: 2;
    pointer-events: none;
}

@keyframes scanMove {
    0% {
        top: 0;
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    95% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.modal-status-dot {
    position: absolute;
    bottom: 50px;
    right: 0;
    width: 14px;
    height: 14px;
    background: #2ecc71;
    border: 3px solid #0a0a0f;
    border-radius: 50%;
    box-shadow: 0 0 15px #2ecc71;
}

.id-label {
    font-size: 0.5rem;
    color: #444;
    letter-spacing: 3px;
    font-weight: bold;
    margin-top: 15px;
}

/* Right Column */
.modal-right {
    flex: 1;
    text-align: left;
}

.rank-badge-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.modal-role {
    font-family: var(--font-gaming);
    font-size: 0.75rem;
    color: var(--primary);
    letter-spacing: 6px;
    text-transform: uppercase;
    font-weight: bold;
    background: linear-gradient(90deg, var(--primary), #ff9999);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rank-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 77, 77, 0.3), transparent);
}

.modal-name {
    font-size: 2.2rem;
    font-weight: 950;
    color: #fff;
    letter-spacing: -1px;
    margin-bottom: 15px;
    line-height: 1.1;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    display: block;
}

.bio-section {
    position: relative;
    margin-bottom: 25px;
    min-height: 50px;
}

.quote-icon {
    position: absolute;
    top: -5px;
    left: -15px;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.05);
}

.modal-bio-text {
    color: #888;
    font-size: 0.85rem;
    line-height: 1.6;
    font-style: italic;
    max-width: 350px;
    position: relative;
    z-index: 1;
}

.modal-socials {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #666;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.9rem;
}

.social-link:hover {
    transform: translateY(-3px);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

/* Footer Branding */
.modal-footer-brand {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}

.brand-name {
    display: block;
    font-size: 0.7rem;
    font-weight: 900;
    color: #444;
    letter-spacing: 2px;
}

.dept {
    display: block;
    font-size: 0.45rem;
    color: #222;
    letter-spacing: 1px;
    margin-top: 2px;
}

.serial {
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem;
    color: #222;
}

.close-modal {
    position: absolute;
    top: 25px;
    right: 25px;
    color: #333;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
    z-index: 10;
}

.close-modal:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: perspective(1000px) rotateX(10deg) translateY(20px);
    }

    to {
        opacity: 1;
        transform: perspective(1000px) rotateX(0deg) translateY(0);
    }
}

/* Fix Compact View Badge overlap */
.view-compact .m-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.view-compact .badge {
    margin-bottom: 0;
}



.badge-founder {
    color: var(--accent);
    border: 1px solid var(--accent);
}

.badge-leader {
    color: var(--primary);
    border: 1px solid var(--primary);
    background: rgba(255, 77, 77, 0.1);
}

.badge-member {
    color: #888;
    border: 1px solid #444;
    background: rgba(255, 255, 255, 0.05);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* --- Profile Modal Mobile Responsiveness --- */
@media (max-width: 768px) {
    .profile-modal {
        padding: 20px;
    }

    .modal-card {
        width: 100%;
        max-width: 380px;
        min-height: auto;
        padding: 40px 25px 25px;
        flex-direction: column;
        gap: 20px;
    }

    .modal-content-wrap {
        flex-direction: column;
        gap: 25px;
        align-items: center;
        text-align: center;
    }

    .modal-left {
        width: 100%;
    }

    .id-frame {
        width: 140px;
        height: 140px;
        margin: 0 auto;
    }

    .modal-status-dot {
        bottom: 10px;
        right: calc(50% - 70px);
    }

    .modal-right {
        text-align: center;
        width: 100%;
    }

    .rank-badge-wrap {
        justify-content: center;
        margin-bottom: 15px;
    }

    .rank-line {
        display: none;
    }

    .modal-name {
        font-size: 1.8rem;
        text-align: center;
    }

    .bio-section {
        margin-bottom: 20px;
    }

    .quote-icon {
        left: 0;
        top: -15px;
    }

    .modal-bio-text {
        max-width: 100%;
        margin: 0 auto;
    }

    .modal-socials {
        justify-content: center;
    }

    .modal-footer-brand {
        flex-direction: column;
        align-items: center;
        gap: 5px;
        margin-top: 25px;
        padding-top: 15px;
    }

    .modal-chip {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 25px;
    }

    .close-modal {
        top: 15px;
        right: 15px;
    }

    .modal-watermark {
        font-size: 4rem;
        bottom: 5px;
    }
}