:root {
    --bg-dark: #050505;
    --primary: #ff003c;
    /* Red */
    --glass: rgba(15, 15, 15, 0.85);
    /* Darker glass for better contrast */
    --border: rgba(255, 255, 255, 0.08);
    /* Subtle border */
    --text-main: #fff;
    --text-sec: #aaa;
    --shadow-sm: 0 10px 40px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 20px 60px rgba(255, 0, 60, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Noto Kufi Arabic', sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    transition: 0.3s;
}

/* Texture Overlay */
.vanta-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #0a0002 0%, #000 100%);
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    transition: transform 0.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#orb-1 {
    width: 60vw;
    height: 60vw;
    background: #6b001a;
    top: -20%;
    right: -20%;
}

#orb-2 {
    width: 50vw;
    height: 50vw;
    background: #111;
    bottom: -20%;
    left: -20%;
}

.vanta-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.06;
    pointer-events: none;
}

/* --- LAYOUTS --- */
.main-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

/* BENTO GRID */
.bento-grid {
    display: grid;
    grid-template-columns: 350px 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 25px;
    width: 100%;
    max-width: 1100px;
}

/* --- GLASS CARD --- */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border);
    border-radius: 35px;
    padding: 35px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    border-color: rgba(255, 0, 60, 0.4);
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* 1. PROFILE CARD */
.profile-card {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.avatar-wrapper {
    width: 160px;
    height: 160px;
    margin-bottom: 25px;
    position: relative;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #111;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.status-badge {
    width: 24px;
    height: 24px;
    background: #444;
    border-radius: 50%;
    position: absolute;
    bottom: 10px;
    right: 10px;
    border: 4px solid #111;
}

.status-badge.online {
    background: #0f6;
    box-shadow: 0 0 15px #0f6;
}

.premium-name {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 8px;
    color: #fff;
    line-height: 1;
}

.title-shimmer {
    color: var(--primary);
    font-size: 0.85rem;
    letter-spacing: 3px;
    font-weight: 700;
    margin-bottom: 25px;
    opacity: 1;
    text-transform: uppercase;
}

.premium-desc {
    color: var(--text-sec);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 90%;
}

.stats-grid {
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-buttons {
    width: 100%;
    display: flex;
    gap: 10px;
    flex-direction: column;
    margin-top: auto;
}

.nav-pill-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, rgba(255, 0, 60, 0.1), transparent);
    color: #fff;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    border: 1px solid rgba(255, 0, 60, 0.2);
}

.nav-pill-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.nav-pill-btn.secondary {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border);
}

.nav-pill-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* --- FRIENDS PAGE --- */
.friends-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.95), transparent);
    z-index: 100;
    backdrop-filter: blur(5px);
}

/* Ensure center item stays centered */
.top-nav>* {
    flex: 1;
    display: flex;
}

.top-nav> :nth-child(2) {
    justify-content: center;
}

/* Title */
.top-nav> :nth-child(3) {
    justify-content: flex-end;
}

/* Lang Btn */

.back-btn {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    border: 1px solid var(--border);
    transition: 0.3s;
    width: fit-content;
    /* Don't stretch */
}

.back-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateX(-5px);
}

html[dir="rtl"] .back-btn:hover {
    transform: translateX(5px);
}

.nav-lang-btn {
    width: fit-content;
    margin: 0;
}

.page-title {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 0, 60, 0.5);
    animation: fadeInDown 0.8s ease forwards;
}

.flipped-icon {
    transform: rotate(180deg);
}

html[dir="rtl"] .flipped-icon {
    transform: rotate(0deg);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.friends-grid-huge {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
}

.friend-card-huge {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 0;
    /* Removing padding to allow cover image */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Removed default opacity: 0 to ensure visibility */
    animation: popIn 0.6s ease forwards;
    backdrop-filter: blur(20px);
    height: 380px;
}

.friend-card-huge:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(255, 0, 60, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Fake Cover Image */
.friend-card-huge::before {
    content: '';
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #1a0505, #4a0010);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    transition: 0.4s;
}

.friend-card-huge:hover::before {
    height: 130px;
    filter: brightness(1.2);
}

.fc-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    margin-top: 50px;
    /* Offset for cover */
}

.fc-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 4px solid #111;
    background: #111;
}

.fc-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 5px;
}

.fc-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.fc-stat-item {
    font-size: 0.9rem;
    color: #ccc;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.fc-stat-item i {
    color: var(--primary);
    font-size: 0.8rem;
}

.fc-bio {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: auto;
    line-height: 1.5;
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fc-socials {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    justify-content: center;
}

.fc-social-btn {
    width: 45px;
    height: 45px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.03);
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: 0.3s;
    text-decoration: none;
    border: 1px solid var(--border);
}

.fc-social-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    border-color: var(--primary);
}

.fc-live-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    backdrop-filter: blur(5px);
}

.fc-live-badge.live {
    background: #f03;
    color: #fff;
    box-shadow: 0 0 15px #f03;
    border-color: #f03;
}

/* 2. KICK CARD */
.kick-card {
    grid-column: 2 / 4;
    grid-row: 1 / 2;
    background: linear-gradient(135deg, #0f0f0f, #1a0505);
    border-color: rgba(255, 0, 60, 0.2);
}

.kick-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.kick-brand {
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
}

.live-tag {
    background: #000;
    color: #444;
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.8rem;
    border: 1px solid #222;
}

.stream-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.1;
    color: #fff;
}

.premium-kick-btn {
    background: #fff;
    color: #000;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    font-weight: 800;
    transition: 0.3s;
    font-size: 1rem;
}

.premium-kick-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.05);
}


/* 3. SOCIALS (APP ICONS) */
.social-card {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.social-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    height: 100%;
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    text-decoration: none;
    color: #ccc;
    font-size: 2.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Force center */
    transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-icon i {
    display: block;
}

/* Ensure icon is block */

.app-icon:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Brand Glows */
.app-icon.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: transparent;
}

.app-icon.twitter:hover {
    background: #000;
    border-color: #333;
}

.app-icon.youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
}

.app-icon.discord:hover {
    background: #5865F2;
    border-color: #5865F2;
}


/* 4. SERVER CARD (Hidden RP) */
.server-card {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.9), rgba(10, 10, 10, 0.95));
}

.server-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    height: 100%;
    justify-content: center;
}

.server-logo-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.server-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.server-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.server-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.server-abbr {
    font-size: 0.9rem;
    color: #666;
    font-weight: 700;
    letter-spacing: 2px;
}

.server-status {
    font-size: 0.8rem;
    color: #0f6;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #0f6;
    border-radius: 50%;
    box-shadow: 0 0 10px #0f6;
}

.server-btn {
    width: 100%;
    padding: 10px;
    background: rgba(255, 0, 60, 0.8);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
    border: 1px solid rgba(255, 0, 60, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.server-btn:hover {
    background: var(--primary);
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.4);
    transform: translateY(-2px);
}

.server-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.server-btn.secondary {
    background: rgba(88, 101, 242, 0.1);
    border-color: rgba(88, 101, 242, 0.3);
    color: #ccc;
}

.server-btn.secondary:hover {
    background: #5865F2;
    border-color: #5865F2;
    color: #fff;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.4);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 20px 60px rgba(255, 0, 60, 0.2);
    border: 1px solid var(--border);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.stream-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
}

/* Lang Switcher */
.lang-switch-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 50;
}

.glass-btn-sm {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.glass-btn-sm:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .profile-card {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .kick-card {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }

    .social-card {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }

    .server-card {
        grid-column: 1 / 2;
        grid-row: 4 / 5;
    }

    /* Stack server card */
}

/* --- CHARACTERS PAGE --- */
.character-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 400px;
    /* Taller for cinematic feel */
}

.character-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

.char-img-wrapper {
    width: 100%;
    height: 60%;
    position: relative;
    overflow: hidden;
}

.char-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
    filter: brightness(0.8);
}

.character-card:hover .char-img {
    transform: scale(1.1);
    filter: brightness(1);
}

.char-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.char-role-badge {
    align-self: flex-start;
    padding: 6px 15px;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: auto;
    /* Push to top */
    margin-top: 20px;
}

.char-info {
    margin-top: auto;
}

.char-name {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 5px;
    text-transform: uppercase;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.char-job {
    font-size: 1rem;
    color: #ccc;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

/* THEMES */
/* Military/Cop - Buster Kennon */
.character-card.military {
    border-color: rgba(52, 152, 219, 0.5);
    background: linear-gradient(135deg, rgba(20, 40, 60, 0.9), rgba(10, 20, 30, 0.95)),
        url('https://www.transparenttextures.com/patterns/cubes.png');
}

.character-card.military .char-role-badge {
    background: #2980b9;
    color: #fff;
    border-color: #3498db;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.6);
}

.character-card.military:hover {
    box-shadow: 0 0 40px rgba(52, 152, 219, 0.3);
    border-color: #3498db;
}

/* Citizen - Abo Niyan */
.character-card.citizen {
    border-color: rgba(230, 126, 34, 0.5);
    background: linear-gradient(135deg, rgba(60, 30, 10, 0.9), rgba(30, 10, 5, 0.95)),
        url('https://www.transparenttextures.com/patterns/wood-pattern.png');
}

.character-card.citizen .char-role-badge {
    background: #d35400;
    color: #fff;
    border-color: #e67e22;
    box-shadow: 0 0 15px rgba(230, 126, 34, 0.6);
}

.character-card.citizen:hover {
    box-shadow: 0 0 40px rgba(230, 126, 34, 0.3);
    border-color: #e67e22;
}

/* Common Card Enhancements */
.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.05) 45%, transparent 50%);
    background-size: 200% 200%;
    opacity: 0;
    transition: 0.5s;
    pointer-events: none;
    z-index: 3;
}

.character-card:hover::before {
    opacity: 1;
    background-position: 100% 100%;
}

/* --- CUSTOM NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
}

.glass-toast {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    padding: 15px 25px;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    animation: slideUpFade 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    pointer-events: all;
    min-width: 300px;
}

.glass-toast.success {
    border-left-color: #0f6;
}

.glass-toast.error {
    border-left-color: #f03;
}

.toast-icon {
    font-size: 1.2rem;
}

.glass-toast.success .toast-icon {
    color: #0f6;
}

.glass-toast.error .toast-icon {
    color: #f03;
}

@keyframes slideUpFade {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        transform: translateY(-10px);
        opacity: 0;
    }
}