body {
    background-color: #000 !important;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    color: #fff;
    font-family: 'Special Elite', cursive;
    overflow: hidden;
    cursor: url('fvck.webp'), auto;
}

a, button, .discord-link, .group-link, .modal-close {
    cursor: url('fvck.webp'), pointer !important;
}

#bg-video {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -2;
    filter: brightness(0.6) grayscale(0.5);
    transition: opacity 2s ease-in-out;
    opacity: 0 !important;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
    transition: opacity 2s ease-in-out;
    opacity: 0 !important;
    display: none !important;
}

.content-wrapper {
    text-align: left;
    width: 100%;
    padding: 40px;
    z-index: 10;
}

#typing-area {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 1.1rem;
    line-height: 1.4;
    color: #e0e0e0;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

#final-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    transition: opacity 2s ease-in-out;
    opacity: 0 !important;
    display: none !important;
}

.main-logo {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 8rem;
    font-weight: 900;
    margin-bottom: 30px;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 15px;
    color: rgba(255, 255, 255, 0.15);
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.15) 50%, 
        #8b0000 50%, 
        #4a0000 100%);
    background-size: 100% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    animation: blood-fill 8s infinite ease-in-out, pulse-glow 4s infinite ease-in-out;
    position: relative;
    display: inline-block;
}

@keyframes blood-fill {
    0%, 100% { background-position: 0 100%; }
    50% { background-position: 0 20%; }
}

@keyframes pulse-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 5px rgba(139, 0, 0, 0));
    }
    50% { 
        filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.6)) drop-shadow(0 0 30px rgba(139, 0, 0, 0.4));
    }
}

.discord-link {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 12px 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    text-decoration: none;
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 4px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

.discord-icon {
    width: 28px;
    height: 28px;
    fill: #fff;
    filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 8px #fff) drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
    transition: all 0.4s ease;
}

.discord-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.discord-link:hover .discord-icon {
    transform: rotate(-10deg) scale(1.2);
    filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #fff) drop-shadow(0 0 25px #5865F2);
}

.hidden {
    display: none !important;
}

/* ─── Buttons Row ───────────────────────────── */
.buttons-row {
    display: inline-flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

/* ─── Group Button ──────────────────────────── */
.group-link {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 12px 40px;
    background: rgba(0, 255, 180, 0.04);
    border: 1px solid rgba(0, 255, 180, 0.35);
    color: #fff;
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

.group-icon {
    width: 26px;
    height: 26px;
    fill: #00ffb4;
    filter: drop-shadow(0 0 3px #00ffb4) drop-shadow(0 0 10px #00ffb4) drop-shadow(0 0 18px rgba(0, 255, 180, 0.5));
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.group-link:hover {
    background: rgba(0, 255, 180, 0.1);
    border-color: #00ffb4;
    color: #00ffb4;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 255, 180, 0.15);
}

.group-link:hover .group-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 6px #00ffb4) drop-shadow(0 0 18px #00ffb4) drop-shadow(0 0 30px rgba(0, 255, 180, 0.6));
}

/* ─── Modal Overlay ─────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    animation: fadeInOverlay 0.3s ease forwards;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-box {
    position: relative;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(0, 255, 180, 0.15);
    border-radius: 16px;
    width: min(1000px, 94vw);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 255, 180, 0.05);
    animation: slideUpModal 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideUpModal {
    from { transform: translateY(40px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    font-size: 1rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

/* ─── Modal Header ──────────────────────────── */
.modal-header {
    padding: 32px 36px 20px;
    border-bottom: 1px solid rgba(0, 255, 180, 0.1);
    text-align: center;
    flex-shrink: 0;
}

.modal-header-icon {
    width: 44px;
    height: 44px;
    fill: #00ffb4;
    filter: drop-shadow(0 0 6px #00ffb4) drop-shadow(0 0 14px rgba(0,255,180,0.4));
    margin-bottom: 10px;
}

.modal-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 8px;
    margin: 0 0 6px;
}

.modal-title span {
    color: #00ffb4;
    text-shadow: 0 0 12px rgba(0,255,180,0.6);
}

.modal-subtitle {
    font-family: monospace;
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.35);
    margin: 0;
    text-transform: uppercase;
}

/* ─── Profiles Grid ─────────────────────────── */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.profiles-grid::-webkit-scrollbar { width: 6px; }
.profiles-grid::-webkit-scrollbar-track { background: transparent; }
.profiles-grid::-webkit-scrollbar-thumb { background: rgba(0,255,180,0.2); border-radius: 3px; }
.profiles-grid::-webkit-scrollbar-thumb:hover { background: rgba(0,255,180,0.4); }

/* ─── Profile Card ──────────────────────────── */
.profile-card {
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: visible; /* Allow avatar to pop if needed, though we'll contain it better */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    margin-top: 20px; /* Space for avatar overlap if we push it higher */
}

.profile-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 180, 0.4);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 255, 180, 0.1);
}

.profile-card:hover .card-badge {
    background: rgba(0, 255, 180, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 180, 0.3);
}

.profile-card:hover .card-avatar {
    border-color: #00ffb4;
    box-shadow: 0 0 20px rgba(0, 255, 180, 0.4);
}

.card-banner {
    width: 100%;
    height: 120px;
    background: #050505;
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.card-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%),
                      radial-gradient(rgba(0, 255, 180, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 15px 15px;
}

.card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    position: relative;
    z-index: 1;
}

.card-banner-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a, #111, #0a0a0a);
}

.card-avatar-wrap {
    position: relative;
    margin-top: -45px; /* Deeper overlap */
    padding: 0 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    z-index: 2;
}

.card-avatar {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    border: 5px solid #0f0f0f;
    object-fit: cover;
    background: #111;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.6);
    transition: all 0.3s ease;
}

.card-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: monospace;
    padding: 5px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.badge-owner {
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.1);
    border: 1px solid rgba(255, 204, 0, 0.4);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.1);
}

.badge-founder {
    color: #00ffb4;
    background: rgba(0, 255, 180, 0.1);
    border: 1px solid rgba(0, 255, 180, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 180, 0.1);
}

.profile-card:hover .badge-owner {
    background: rgba(255, 204, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
}

.profile-card:hover .badge-founder {
    background: rgba(0, 255, 180, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 180, 0.3);
}

.card-body {
    padding: 15px 22px 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-display-name {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 5px 0 2px;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.card-username {
    font-family: monospace;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.3);
    margin: 0 0 20px;
}

.card-id {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: monospace;
    font-size: 0.65rem;
    color: rgba(0,255,180,0.5);
    letter-spacing: 1px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 10px;
    word-break: break-all;
}

.card-id-label {
    color: rgba(0,255,180,0.35);
    font-size: 0.6rem;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* ─── Loading & Empty States ────────────────── */
.loading-state, .empty-state, .error-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 20px;
    color: rgba(255,255,255,0.3);
    font-family: monospace;
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(0,255,180,0.1);
    border-top-color: #00ffb4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state svg, .error-state svg {
    width: 48px;
    height: 48px;
    fill: rgba(255,255,255,0.1);
}

/* ─── Responsive ────────────────────────────── */
@media (max-width: 600px) {
    .main-logo { font-size: 3.5rem; letter-spacing: 6px; }
    #typing-area { font-size: 0.9rem; }
    .buttons-row { flex-direction: column; gap: 14px; }
    .discord-link, .group-link { width: 220px; justify-content: center; }
    .modal-box { width: 96vw; max-height: 90vh; }
    .profiles-grid { grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
    .modal-header { padding: 24px 20px 16px; }
    .modal-title { font-size: 1.3rem; letter-spacing: 4px; }
}

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