:root {
    /* Base colors */
    --black-dark: #0a0a0a;
    --black-medium: #1a1a1a;
    --black-light: rgba(255, 255, 255, 0.1);
    --gray-light: #b8b8b8;
    --white: #ffffff;
    /* Gaming accent colors */
    --primary-blue: #5865F2;
    --primary-blue-dark: #4752C4;
    --accent-purple: #9B59B6;
    --accent-cyan: #1ABC9C;
    --accent-red: #E74C3C;
    --accent-orange: #F39C12;
    --accent-green: #2ECC71;
    /* Glow effects */
    --blue-glow: rgba(88, 101, 242, 0.6);
    --purple-glow: rgba(155, 89, 182, 0.6);
    --cyan-glow: rgba(26, 188, 156, 0.6);
    /* Glass effect - White version */
    --glass-white: rgba(255, 255, 255, 0.08);
    --glass-dark: rgba(0, 0, 0, 0.3);
    /* Transparent variants */
    --blue-transparent: rgba(88, 101, 242, 0.2);
    --purple-transparent: rgba(155, 89, 182, 0.2);
    --cyan-transparent: rgba(26, 188, 156, 0.2);
}
/* Profile Image Styles */
.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    border: 4px solid var(--primary-blue);
    box-shadow: 0 0 35px var(--blue-glow);
    transition: all 0.4s ease;
}

.main-card:hover .profile-image {
    transform: scale(1.05);
    box-shadow: 0 0 45px var(--accent-purple);
}

/* Make the animated avatar appear behind the image */
.discord-avatar {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    filter: blur(8px) brightness(1.2);
    opacity: 0.7;
}
/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--black-dark);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Video - NEW BACKGROUND */
#video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: blur(2px) brightness(0.4);
    /* iOS fix */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
}

/* Triangles Animation */
.triangles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 20px solid var(--primary-blue);
    opacity: 0;
    animation: triangleFall linear infinite;
}

@keyframes triangleFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Intro - NO BOX, just text floating */
#intro {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease;
    cursor: pointer;
}

/* Dark overlay for intro */
.intro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.85);
    z-index: 1;
}

/* Intro text container - NO BOX */
.intro-text-container {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.intro-text {
    font-size: 5rem;
    font-weight: 900;
    font-family: 'Oxanium', sans-serif;
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-purple), var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px var(--blue-glow);
    animation: glow 2s ease-in-out infinite alternate;
    letter-spacing: 2px;
}

.logo-x {
    color: var(--accent-cyan);
    -webkit-text-fill-color: var(--accent-cyan);
}

.logo-dash {
    color: var(--white);
    -webkit-text-fill-color: var(--white);
    font-weight: 300;
}

.logo-chakir {
    color: var(--accent-purple);
    -webkit-text-fill-color: var(--accent-purple);
}

.subtext {
    font-size: 1.5rem;
    color: var(--gray-light);
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

/* Animations */
@keyframes glow {
    from {
        text-shadow: 0 0 35px var(--blue-glow), 0 0 40px var(--blue-glow);
    }

    to {
        text-shadow: 0 0 45px var(--purple-glow), 0 0 50px var(--purple-glow);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Content Transitions */
#intro.fade-out {
    opacity: 0;
    pointer-events: none;
}

#main-content {
    opacity: 0;
    transition: opacity 1.5s ease;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

    #main-content.hidden {
        display: none;
    }

    #main-content.show {
        opacity: 1;
    }

/* Main Wrapper */
.main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding-top: 40px;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--glass-white);
    border: 1px solid var(--primary-blue);
    border-radius: 15px;
    padding: 25px 40px;
    text-align: center;
    min-width: 220px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px var(--blue-transparent);
}

    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 0 30px var(--blue-glow);
        border-color: var(--accent-cyan);
    }

    .stat-card .stat-number {
        font-size: 2.8rem;
        font-weight: 800;
        color: var(--accent-cyan);
        margin-bottom: 5px;
        font-family: 'Oxanium', sans-serif;
    }

    .stat-card .stat-label {
        color: var(--gray-light);
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 2px;
        font-weight: 600;
    }

/* Main Card */
.main-card {
    display: flex;
    background: var(--glass-white);
    border: 1px solid var(--primary-blue);
    border-radius: 25px;
    padding: 40px;
    gap: 40px;
    box-shadow: 0 0 40px var(--blue-transparent);
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

    .main-card:hover {
        box-shadow: 0 0 50px var(--blue-glow);
        transform: scale(1.01);
    }

/* Card Left Column */
.card-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-right: 40px;
    border-right: 1px solid var(--black-light);
}

/* Animated Avatar Container */
.avatar-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
}

.discord-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 4px solid var(--primary-blue);
    box-shadow: 0 0 35px var(--blue-glow);
    transition: all 0.4s ease;
}

/* Discord-style animated avatar themes */
.blue-theme {
    background: linear-gradient(45deg, #5865F2, #1ABC9C);
    animation: gradientShift 3s ease infinite, pulse 2s ease-in-out infinite;
}

.purple-theme {
    background: linear-gradient(45deg, #9B59B6, #E1306C);
    animation: gradientShift 3s ease infinite, pulse 2s ease-in-out infinite 0.5s;
}

.red-theme {
    background: linear-gradient(45deg, #E74C3C, #F39C12);
    animation: gradientShift 3s ease infinite, pulse 2s ease-in-out infinite 1s;
}

.green-theme {
    background: linear-gradient(45deg, #2ECC71, #1ABC9C);
    animation: gradientShift 3s ease infinite, pulse 2s ease-in-out infinite 1.5s;
}

.gold-theme {
    background: linear-gradient(45deg, #F1C40F, #E67E22);
    animation: gradientShift 3s ease infinite, pulse 2s ease-in-out infinite 2s;
}

/* Avatar animations */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 35px currentColor;
    }

    50% {
        box-shadow: 0 0 50px currentColor;
    }
}

/* Avatar status indicator */
.avatar-status {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--black-dark);
    padding: 5px 10px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--black-light);
    backdrop-filter: blur(5px);
    z-index: 2;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

    .status-dot.online {
        background-color: var(--accent-green);
        box-shadow: 0 0 10px var(--accent-green);
        animation: statusPulse 2s infinite;
    }

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.status-text {
    font-size: 0.8rem;
    color: var(--gray-light);
}

/* Avatar selector */
.avatar-selector {
    margin-top: 20px;
    width: 100%;
}

.selector-title {
    font-size: 1rem;
    color: var(--gray-light);
    margin-bottom: 10px;
    text-align: center;
    font-weight: 500;
}

.avatar-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.avatar-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

    .avatar-option:hover {
        background: var(--glass-dark);
        transform: translateY(-3px);
    }

    .avatar-option.active {
        background: var(--blue-transparent);
        border: 1px solid var(--primary-blue);
    }

.option-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.avatar-option:hover .option-preview {
    transform: scale(1.1);
}

.option-name {
    font-size: 0.8rem;
    color: var(--gray-light);
}

/* Avatar theme previews */
.option-preview.blue-theme {
    background: linear-gradient(45deg, #5865F2, #1ABC9C);
}

.option-preview.purple-theme {
    background: linear-gradient(45deg, #9B59B6, #E1306C);
}

.option-preview.red-theme {
    background: linear-gradient(45deg, #E74C3C, #F39C12);
}

.option-preview.green-theme {
    background: linear-gradient(45deg, #2ECC71, #1ABC9C);
}

.option-preview.gold-theme {
    background: linear-gradient(45deg, #F1C40F, #E67E22);
}

.name-title {
    text-align: center;
    margin-top: 20px;
}

.community-name {
    font-size: 3rem;
    font-weight: 900;
    font-family: 'Oxanium', sans-serif;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-purple), var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px var(--blue-glow);
}

.community-tagline {
    font-size: 1.2rem;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Card Right Column */
.card-right {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.description-section {
    margin-bottom: 10px;
}

.description-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--gray-light);
    max-width: 700px;
}

/* Community Stats */
.community-stats {
    display: flex;
    gap: 30px;
    margin: 20px 0;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    border: 1px solid var(--black-light);
    transition: all 0.3s ease;
    min-width: 150px;
}

    .stat-item:hover {
        border-color: var(--primary-blue);
        transform: translateY(-5px);
        box-shadow: 0 0 20px var(--blue-transparent);
    }

.stat-big-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-cyan);
    margin-bottom: 8px;
    font-family: 'Oxanium', sans-serif;
}

.stat-small-label {
    font-size: 0.9rem;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Social Section */
.social-section {
    margin-top: 10px;
}

.social-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--white);
}

.social-subtitle {
    color: var(--gray-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-style: italic;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.social-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--black-medium);
    color: var(--white);
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    border: 1px solid transparent;
}

/* Social button colors */
.discord-btn {
    border-color: var(--primary-blue);
}

.twitter-btn {
    border-color: #1DA1F2;
}

.youtube-btn {
    border-color: #FF0000;
}

.twitch-btn {
    border-color: #9146FF;
}

.instagram-btn {
    border-color: #E1306C;
}

.globe-btn {
    border-color: var(--accent-cyan);
}

.social-icon:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 0 25px currentColor;
}

.discord-btn:hover {
    background: var(--primary-blue);
}

.twitter-btn:hover {
    background: #1DA1F2;
}

.youtube-btn:hover {
    background: #FF0000;
}

.twitch-btn:hover {
    background: #9146FF;
}

.instagram-btn:hover {
    background: #E1306C;
}

.globe-btn:hover {
    background: var(--accent-cyan);
}

/* Tooltip */
.tooltip {
    position: absolute;
    top: -40px;
    background: var(--black-dark);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    color: var(--white);
    border: 1px solid var(--primary-blue);
    z-index: 10;
}

.social-icon:hover .tooltip {
    opacity: 1;
    transform: translateY(-5px);
}

/* Join Button */
.join-button {
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-purple));
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px var(--blue-transparent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    align-self: flex-start;
    margin-top: 10px;
}

    .join-button:hover {
        transform: translateY(-5px);
        box-shadow: 0 0 40px var(--purple-glow);
        background: linear-gradient(90deg, var(--accent-purple), var(--primary-blue));
    }

    .join-button:active {
        transform: translateY(-2px);
    }

/* Volume Control */
#volume-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

#volume-icon {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-right: 10px;
    cursor: pointer;
    transition: transform 0.3s, color 0.3s;
}

#volume-container:hover #volume-icon {
    transform: scale(1.1);
    color: var(--accent-cyan);
}

#volume-control {
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

#volume-container:hover #volume-control {
    width: 120px;
    opacity: 1;
}

#volume-slider {
    width: 100%;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000;
}

    .theme-toggle i {
        color: var(--gray-light);
        font-size: 1.2rem;
    }

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--black-medium);
    transition: 0.4s;
    border-radius: 34px;
    border: 1px solid var(--primary-blue);
}

    .slider:before {
        position: absolute;
        content: "";
        height: 22px;
        width: 22px;
        left: 4px;
        bottom: 3px;
        background-color: var(--primary-blue);
        transition: 0.4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: var(--black-medium);
}

    input:checked + .slider:before {
        transform: translateX(28px);
        background-color: var(--accent-cyan);
    }

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--glass-white);
    border: 1px solid var(--primary-blue);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.modal-header {
    padding: 25px 30px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--black-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h3 {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--white);
        margin: 0;
    }

.close-modal {
    background: none;
    border: none;
    color: var(--gray-light);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

    .close-modal:hover {
        color: var(--white);
    }

.modal-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: var(--gray-light);
    }

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--black-light);
    border-radius: 10px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s;
}

    .form-input:focus {
        outline: none;
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 2px var(--blue-transparent);
        background: rgba(0, 0, 0, 0.3);
    }

.modal-footer {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--black-light);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn {
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
}

.btn-cancel {
    background: var(--black-light);
    color: var(--white);
}

    .btn-cancel:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.btn-save {
    background: var(--primary-blue);
    color: white;
}

    .btn-save:hover {
        background: var(--primary-blue-dark);
    }

/* Responsive Design */
@media (max-width: 1200px) {
    .main-card {
        flex-direction: column;
        max-width: 90%;
    }

    .card-left {
        border-right: none;
        border-bottom: 1px solid var(--black-light);
        padding-right: 0;
        padding-bottom: 30px;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .intro-text {
        font-size: 3.5rem;
    }

    .stats-row {
        gap: 20px;
    }

    .stat-card {
        min-width: 180px;
        padding: 20px 30px;
    }

        .stat-card .stat-number {
            font-size: 2.2rem;
        }

    .main-card {
        padding: 30px;
    }

    .avatar-container {
        width: 180px;
        height: 180px;
    }

    .community-name {
        font-size: 2.5rem;
    }

    .community-stats {
        flex-direction: column;
        align-items: center;
    }

    .stat-item {
        width: 100%;
        max-width: 250px;
    }

    .avatar-options {
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .intro-text {
        font-size: 2.5rem;
    }

    .subtext {
        font-size: 1.2rem;
    }

    .stat-card {
        min-width: 140px;
        padding: 15px 20px;
    }

        .stat-card .stat-number {
            font-size: 1.8rem;
        }

    .main-card {
        padding: 20px;
    }

    .avatar-container {
        width: 150px;
        height: 150px;
    }

    .community-name {
        font-size: 2rem;
    }

    .avatar-options {
        gap: 5px;
    }

    .option-preview {
        width: 30px;
        height: 30px;
    }

    .option-name {
        font-size: 0.7rem;
    }

    .social-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .join-button {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    #video-background {
        -webkit-transform: translate3d(0,0,0);
        transform: translate3d(0,0,0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}
