:root {
    --primary: #00f3ff;
    --secondary: #bc13fe;
    --neon-red: #ff2a6d;
    --bg-dark: #050505;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #e0e0e0;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--bg-dark);
    background-image: url('bg.gif'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0; padding: 0; min-height: 100vh; overflow-x: hidden;
    display: flex; flex-direction: column;
}

body::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 15, 0.85);
    z-index: -1; pointer-events: none;
}

/* --- PRELOADER STYLES --- */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.5s ease;
}
.loader {
    width: 50px; height: 50px;
    border: 3px solid rgba(0, 243, 255, 0.3); border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    box-shadow: 0 0 20px var(--primary);
}
@keyframes spin { to { transform: rotate(360deg); } }

header {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px); padding: 15px 40px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--glass-border); position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

.logo-container { display: flex; align-items: center; gap: 15px; }
.header-logo { height: 45px; width: auto; filter: drop-shadow(0 0 8px var(--primary)); transition: all 0.3s ease; }

h1 {
    font-family: 'Orbitron', sans-serif; margin: 0; font-size: 26px; letter-spacing: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

button {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    border: none; color: #000; padding: 8px 20px;
    font-family: 'Orbitron', sans-serif; font-weight: bold; text-transform: uppercase; cursor: pointer;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%); 
    transition: all 0.3s ease; display: inline-block; text-align: center;
}
button:hover { transform: translateY(-2px); box-shadow: 0 0 25px var(--primary); filter: brightness(1.2); }
button:disabled { background: #333; color: #777; cursor: not-allowed; filter: grayscale(1); box-shadow: none; }

.container { max-width: 95%; margin: 40px auto; padding: 0 20px; box-sizing: border-box; flex: 1; }
.glass-card { background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); padding: 30px; margin-bottom: 30px; border-radius: 15px; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); width: 100%; box-sizing: border-box; }

/* --- HERO SECTION STYLES --- */
.hero-section {
    text-align: center; padding: 80px 0 50px 0; position: relative; width: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    overflow: hidden; 
}

.hero-svg-text {
    width: 100%; height: auto; margin-bottom: 15px; 
    cursor: pointer; overflow: visible;
}
.hero-svg-desktop { display: block; }
.hero-svg-mobile { display: none; }

.text-part {
    font-family: 'Orbitron', sans-serif; font-size: 110px;
    font-weight: 900; text-transform: uppercase; letter-spacing: 8px;   
    stroke-width: 0; transition: all 0.4s ease;
}

.welcome-part { fill: #ffffff; filter: drop-shadow(0 0 10px rgba(255,255,255,0.3)); } 
.nexus-part { fill: var(--primary); filter: drop-shadow(0 0 15px var(--primary)); } 

.hero-svg-text:hover .text-part {
    fill: rgba(255, 255, 255, 0.02); stroke-width: 3.5px; stroke: #fff;
    stroke-dasharray: 60 120; stroke-dashoffset: 2000;
    animation: electric-zap 0.05s linear infinite, flicker-glow 0.5s infinite alternate;
}
.hero-svg-text:hover .welcome-part { filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 12px var(--primary)) drop-shadow(0 0 30px var(--primary)); }
.hero-svg-text:hover .nexus-part { filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 12px var(--secondary)) drop-shadow(0 0 30px var(--neon-red)); }

@keyframes electric-zap { to { stroke-dashoffset: 0; } }
@keyframes flicker-glow {
    0% { opacity: 1; stroke-width: 3.5px; } 50% { opacity: 0.6; stroke-width: 2.8px; } 100% { opacity: 1; stroke-width: 3.5px; }
}

.typewriter-container { display: inline-block; position: relative; min-height: 40px; margin-top: 5px; }
.typewriter-text {
    font-family: 'Rajdhani', sans-serif; font-size: 1.6rem; color: #aaa; letter-spacing: 2px;
    overflow: hidden; border-right: 4px solid var(--primary); white-space: nowrap; margin: 0 auto;
    max-width: 0; animation: typing 3.5s steps(60, end) forwards, blink-caret .75s step-end infinite;
    text-shadow: 0 0 5px var(--primary);
}
@keyframes typing { from { max-width: 0; } to { max-width: 100%; } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--primary); } }

.carousel-container { position: relative; width: 100%; height: 600px; display: flex; justify-content: center; align-items: center; perspective: 1200px; margin-top: 50px; }

.game-card { position: absolute; width: 320px; height: 500px; border-radius: 30px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 15px 35px rgba(0,0,0,0.8); cursor: pointer; background-size: cover; overflow: hidden; }

.game-card::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 30px; pointer-events: none; z-index: 3;
    background: radial-gradient(circle at center, transparent 30%, var(--glow-color));
    mix-blend-mode: overlay; opacity: 0.6;
    box-shadow: inset 0 0 60px rgba(0,0,0,0.7), inset 0 0 30px var(--glow-color);
    transition: all 0.5s ease;
}
.game-card:hover::after { opacity: 0.8; box-shadow: inset 0 0 80px rgba(0,0,0,0.9), inset 0 0 50px var(--glow-color); }

.game-card.center { transform: translateX(0) scale(1.05) translateZ(100px); z-index: 10; opacity: 1; filter: brightness(1.2); border: 2px solid rgba(255,255,255,0.2); }
.game-card.left { transform: translateX(-480px) scale(0.9) rotateY(-25deg) translateZ(-50px); z-index: 5; opacity: 0.9; filter: brightness(0.9) grayscale(0.2); }
.game-card.right { transform: translateX(480px) scale(0.9) rotateY(25deg) translateZ(-50px); z-index: 5; opacity: 0.9; filter: brightness(0.9) grayscale(0.2); }

.carousel-nav { display: flex; justify-content: center; gap: 20px; margin-top: 60px; position: relative; z-index: 20; }
.nav-dot { width: 14px; height: 14px; border: 2px solid var(--primary); border-radius: 50%; cursor: pointer; transition: all 0.4s ease; background: transparent; }
.nav-dot.active { background: #fff; border-color: #fff; box-shadow: 0 0 15px #fff, 0 0 30px var(--primary); transform: scale(1.3); }

.card-video-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 30px; z-index: 2; opacity: 0; transition: opacity 0.6s ease; mix-blend-mode: normal; }
.game-card:hover .card-video-bg { opacity: 1; }

.char-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform 0.5s ease; }
.game-card:hover .char-img { transform: scale(1.1); }

.card-content { 
    z-index: 4; text-align: center; width: 100%; padding-bottom: 60px; 
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 80%);
    position: absolute; bottom: 0; left: 0;
}

.theme-red { --glow-color: #ff4d4d; }
.theme-blue { --glow-color: #4d94ff; }
.theme-green { --glow-color: #00b359; }

.card-bg-mesh { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px); background-size: 20px 20px; opacity: 0.2; border-radius: 30px; z-index: 1; pointer-events: none;}

.top-badge-left { position: absolute; top: 20px; left: 20px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); padding: 5px 12px; border-radius: 15px; font-size: 0.8rem; color: #fff; z-index: 4; }

.multiplayer-tag {
    position: absolute; top: 20px; right: 20px; padding: 5px 12px;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    border: 1px solid var(--glow-color); border-radius: 12px;
    font-size: 0.7rem; font-weight: 800; letter-spacing: 1px; color: var(--glow-color);
    z-index: 4; box-shadow: inset 0 0 5px var(--glow-color), 0 5px 15px rgba(0,0,0,0.3);
    text-transform: uppercase;
}

.char-name { font-family: 'Carter One', cursive; font-size: 2.5rem; text-transform: uppercase; margin: 0; line-height: 0.9; text-shadow: 0 5px 15px rgba(0,0,0,0.6); }

.play-now-btn {
    display: block; width: fit-content; background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(5px); border: 1px solid var(--glow-color); padding: 8px 30px;
    border-radius: 20px; margin: 25px auto; 
    color: #fff; font-family: 'Orbitron', sans-serif; font-size: 1rem; cursor: pointer; text-transform: uppercase;
    transition: all 0.3s ease; box-shadow: 0 0 8px var(--glow-color), inset 0 0 5px rgba(0,0,0,0.5); 
    text-shadow: 0 0 5px var(--glow-color); clip-path: none; 
}

.play-now-btn:hover {
    background: var(--glow-color); color: #000; box-shadow: 0 0 20px var(--glow-color);
    border-color: var(--glow-color); transform: translateY(-3px); text-shadow: none;
}

.see-more-text {
    font-size: 0.85rem; color: #ffffff; margin-top: 15px; display: inline-block;
    cursor: pointer; text-decoration: none; letter-spacing: 2px; font-weight: bold;
    transition: all 0.3s ease; border-bottom: 1px solid transparent; text-shadow: 0 2px 4px rgba(0,0,0,0.8); 
}
.see-more-text:hover { color: #fff; text-shadow: 0 0 10px var(--glow-color); border-bottom-color: var(--glow-color); transform: translateY(-2px); }

.role-text { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin-top: 5px; display: block; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 2000; }
.modal-box { background: rgba(0, 20, 40, 0.9); border: 2px solid var(--primary); padding: 40px; border-radius: 20px; text-align: center; box-shadow: 0 0 30px rgba(0, 243, 255, 0.3); max-width: 400px; width: 90%; }
.modal-box h2 { margin-top: 0; color: #fff; font-family: 'Orbitron', sans-serif; }
.input-field { width: 100%; padding: 12px; margin: 10px 0; background: rgba(255,255,255,0.1); border: 1px solid var(--primary); color: #fff; border-radius: 5px; font-size: 1rem; text-align: left; font-family: 'Rajdhani', sans-serif; box-sizing: border-box; }
.input-field:focus { outline: none; box-shadow: 0 0 15px var(--primary); }
.password-wrapper { position: relative; width: 100%; }
.eye-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--primary); opacity: 0.7; }
.eye-icon:hover { opacity: 1; }
.avatar-upload-wrapper { position: relative; width: 100px; height: 100px; margin: 10px auto 20px auto; border-radius: 50%; border: 2px solid var(--primary); overflow: hidden; cursor: pointer; background: rgba(0,0,0,0.5); transition: all 0.3s ease; }
.avatar-upload-wrapper:hover { box-shadow: 0 0 20px var(--primary); border-color: #fff; }
.avatar-preview-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.avatar-upload-wrapper:hover .avatar-preview-img { transform: scale(1.1); filter: brightness(0.5); }
.camera-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; opacity: 0; transition: all 0.3s ease; transform: translateY(20px); }
.avatar-upload-wrapper:hover .camera-overlay { opacity: 1; transform: translateY(0); }
.camera-icon { width: 40px; height: 40px; fill: #fff; filter: drop-shadow(0 0 5px var(--primary)); }
.hidden-file-input { display: none; }
.upload-label-text { font-size: 0.8rem; color: var(--primary); margin-bottom: 5px; display: block;}
.status-msg { margin-top: 10px; font-size: 0.9rem; color: var(--primary); min-height: 20px; }
.switch-link { margin-top: 15px; display: block; color: #aaa; cursor: pointer; text-decoration: underline; font-size: 0.9rem; }
.switch-link:hover { color: #fff; }
.hidden { display: none !important; }
#chat-box { height: 350px; overflow-y: auto; border: 1px solid var(--glass-border); padding: 20px; background: rgba(0, 0, 0, 0.4); border-radius: 10px; margin-bottom: 15px; }
.msg { padding: 10px 15px; margin: 8px 0; border-radius: 10px; max-width: 75%; font-size: 1rem; position: relative; word-wrap: break-word; }
.msg.me { background: linear-gradient(90deg, rgba(0, 243, 255, 0.15), rgba(0, 243, 255, 0.05)); border: 1px solid rgba(0, 243, 255, 0.3); color: #fff; margin-left: auto; text-align: right; }
.msg.other { background: rgba(255, 255, 255, 0.05); border: 1px solid #333; color: #ccc; }
.sender-name { font-size: 0.7rem; color: var(--secondary); display: block; margin-bottom: 4px; font-weight: bold; letter-spacing: 1px; }
.chat-avatar { width: 25px; height: 25px; border-radius: 50%; object-fit: cover; border: 1px solid var(--primary); flex-shrink: 0; }
.msg-flex { display: flex; gap: 10px; align-items: flex-start; }
input[type="text"] { background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); color: #fff; padding: 15px; border-radius: 5px; width: 100%; font-family: 'Rajdhani', sans-serif; font-size: 1rem; box-sizing: border-box; }
input[type="text"]:focus { outline: none; border-color: var(--primary); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
#header-profile-pic { cursor: pointer; transition: 0.3s; }
#header-profile-pic:hover { box-shadow: 0 0 10px var(--primary); }
footer { background: rgba(0, 0, 0, 0.95); border-top: 2px solid var(--primary); padding: 40px 20px; margin-top: 50px; color: #fff; position: relative; }
.footer-content { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; gap: 20px; }
.footer-left { text-align: left; }
.contact-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 1rem; color: #ccc; }
.contact-item svg { width: 20px; height: 20px; fill: var(--primary); }
.footer-right { display: flex; gap: 20px; }
.social-icon { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: all 0.3s ease; text-decoration: none; border: 1px solid transparent; }
.social-icon svg { width: 20px; height: 20px; fill: #fff; transition: fill 0.3s; }
.social-icon:hover { background: var(--primary); box-shadow: 0 0 15px var(--primary); transform: translateY(-3px); border-color: #fff; }
.social-icon:hover svg { fill: #000; }
.social-icon.fb:hover { background: #1877F2; box-shadow: 0 0 15px #1877F2; }
.social-icon.ig:hover { background: #d62976; box-shadow: 0 0 15px #d62976; }
.social-icon.wa:hover { background: #25D366; box-shadow: 0 0 15px #25D366; }
.footer-bottom { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; color: #777; font-family: 'Orbitron', sans-serif; }

.hire-section { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-top: 80px; margin-bottom: 50px; position: relative; overflow: hidden; }
.hire-content { flex: 1; z-index: 2; }
.hire-title { font-family: 'Orbitron', sans-serif; font-size: 3rem; margin: 0 0 20px 0; line-height: 1; }
.hire-title span { color: var(--primary); text-shadow: 0 0 15px var(--primary); }
.hire-bio { font-size: 1.1rem; color: #ccc; line-height: 1.6; margin-bottom: 25px; border-left: 3px solid var(--secondary); padding-left: 20px; background: linear-gradient(90deg, rgba(188, 19, 254, 0.1), transparent); text-align: justify; }
.skill-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.skill-tag { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); padding: 5px 15px; border-radius: 20px; font-size: 0.9rem; color: var(--primary); font-weight: bold; letter-spacing: 1px; transition: 0.3s; }
.skill-tag:hover { background: var(--primary); color: #000; box-shadow: 0 0 15px var(--primary); }
.hire-btn { font-size: 1.2rem; padding: 12px 40px; letter-spacing: 2px; position: relative; overflow: hidden; animation: btn-pulse 2s infinite; }
@keyframes btn-pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 243, 255, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(0, 243, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 243, 255, 0); } }
.profile-visual { flex: 0 0 300px; height: 300px; position: relative; display: flex; align-items: center; justify-content: center; }
.holo-circle { width: 100%; height: 100%; border-radius: 50%; border: 2px solid rgba(0, 243, 255, 0.3); position: absolute; animation: spin-holo 10s linear infinite; box-shadow: 0 0 30px rgba(0, 243, 255, 0.1); }
.holo-circle::before { content: ''; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 15px var(--primary); }
.profile-img-container { width: 240px; height: 240px; border-radius: 50%; overflow: hidden; border: 3px solid var(--secondary); position: relative; z-index: 2; }
.profile-img-container img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.3) contrast(1.2); transition: 0.5s; }
.profile-img-container:hover img { filter: grayscale(0) contrast(1); transform: scale(1.1); }
@keyframes spin-holo { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- RESPONSIVE MEDIA QUERIES (ADJUSTED FOR SPACING) --- */
@media (max-width: 900px) {
    .typewriter-text { font-size: 1.1rem; }
    .hire-section { flex-direction: column-reverse; text-align: center; }
    .hire-bio { border-left: none; border-top: 3px solid var(--secondary); padding: 20px 0; }
    .skill-tags { justify-content: center; }
    .profile-visual { margin-bottom: 20px; }
}

@media (max-width: 768px) {
    header { padding: 15px 20px; flex-direction: column; gap: 15px; }
    #user-info { gap: 10px; }
    h1 { font-size: 22px; }
    
    /* Responsive Logo Adjustment */
    .header-logo { height: 35px; }
    .logo-container { gap: 10px; }

    /* --- REDUCED PADDING AND MARGINS FOR MOBILE --- */
    .hero-section {
        padding: 30px 0 10px 0; /* Reduced from 80px to 30px */
    }

    /* SHOW MOBILE SVG, HIDE DESKTOP SVG */
    .hero-svg-desktop { display: none; }
    .hero-svg-mobile { 
        display: block; 
        margin-bottom: 5px; /* Minimal margin */
    }
    
    .typewriter-text { font-size: 0.7rem; white-space: normal; border-right: none; animation: none; max-width: 100%; letter-spacing: 1px; }
    
    /* Adjust Carousel for Mobile */
    .carousel-container { 
        height: 450px; 
        perspective: 800px; 
        margin-top: 10px; /* Reduced from 50px to 10px */
    }
    
    .game-card { width: 240px; height: 380px; }
    
    .game-card.left { transform: translateX(-60px) scale(0.85) rotateY(-10deg) translateZ(-50px); opacity: 0.7; z-index: 5; }
    .game-card.right { transform: translateX(60px) scale(0.85) rotateY(10deg) translateZ(-50px); opacity: 0.7; z-index: 5; }
    .game-card.center { z-index: 20; transform: translateZ(50px); }

    .char-name { font-size: 1.8rem; }
    .carousel-nav { margin-top: 20px; }

    .footer-content { flex-direction: column; text-align: center; }
    .footer-right { justify-content: center; margin-top: 15px; }
    
    .hire-title { font-size: 2.2rem; }
    .hire-bio { font-size: 1rem; }
}

@media (max-width: 480px) {
    .hero-svg-text { margin-bottom: 5px; }
    .typewriter-text { font-size: 0.65rem; }
    .game-card { width: 200px; height: 320px; }
    .hire-btn { width: 100%; padding: 12px 0; }
}