@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Orbitron:wght@500;600;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-main: #000000;
    --bg-dark: #050505;
    --bg-card: #0a0a0a;
    --bg-hover: #121212;
    --border: #171717;
    --border-light: #202020;
    --text: #ffffff;
    --text-dim: #7a7a7a;
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.5);
    --platinum: #a8d9ff;
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-main);
    color: var(--text);
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* ===== MOBILE FIRST - DISEÑO VERTICAL ===== */
.profile-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    background: var(--bg-dark);
    overflow-x: hidden;
}

/* ===== SIDEBAR (ARRIBA EN MOBILE) ===== */
.profile-sidebar {
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    max-width: 100%;
}

/* Banner */
.profile-banner {
    height: 140px;
    position: relative;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a0a2e 50%, #0d0d0d 100%);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 50%, var(--accent-glow) 0%, transparent 70%);
    animation: bannerPulse 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes bannerPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

.banner-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 4px #fff, 0 0 8px #fff;
    animation: twinkle 2s ease-in-out infinite;
}

.star:nth-child(2n) {
    animation-delay: 0.5s;
    animation-duration: 3s;
}

.star:nth-child(3n) {
    animation-delay: 1s;
    animation-duration: 2.5s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.constellation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.constellation-line {
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 1;
    stroke-dasharray: 2, 3;
    animation: constellationGlow 3s ease-in-out infinite;
}

@keyframes constellationGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Avatar */
.avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -50px;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 100%;
}

.avatar-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 0.9; }
}

.avatar-ring {
    position: absolute;
    width: 110px;
    height: 110px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: rotate 8s linear infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    box-shadow: 0 0 30px var(--accent-glow);
    flex-shrink: 0;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 3px;
    position: absolute;
    top: 0;
    left: 0;
}

/* Mostrar placeholder solo si la imagen no tiene src o está vacío */
.avatar-img[src=""] {
    display: none;
}

.avatar-img[src=""] ~ .avatar-placeholder {
    display: flex;
}

/* Avatar Decoration (estilo Discord) */
.avatar-decoration {
    position: absolute;
    width: 120px;
    height: 120px;
    pointer-events: none;
    z-index: 5;
}

.decoration-svg {
    width: 100%;
    height: 100%;
}

.sparkle {
    animation: sparkleFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 4px currentColor);
}

.sparkle-1 { animation-delay: 0s; }
.sparkle-2 { animation-delay: 0.6s; }
.sparkle-3 { animation-delay: 1.2s; }
.sparkle-4 { animation-delay: 1.8s; }
.sparkle-5 { animation-delay: 2.4s; }

@keyframes sparkleFloat {
    0%, 100% { opacity: 0.3; transform: translateY(0) scale(1); }
    50% { opacity: 1; transform: translateY(-3px) scale(1.2); }
}

.status-badge {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #3ba55d;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(59, 165, 93, 0.6);
    animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
}

/* User Info */
.user-info {
    text-align: center;
    padding: 0 20px 20px;
    width: 100%;
    max-width: 100%;
}

.username {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.5px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.user-tag {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 14px;
}

/* User Badges - Rediseñados */
.user-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    max-width: 100%;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid;
}

.badge-icon {
    font-size: 14px;
    display: flex;
    align-items: center;
}

.badge-text {
    letter-spacing: 0.3px;
}

.pro-badge {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    color: #ffd700;
}

.verified-badge {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

.badge-item:active {
    transform: scale(0.95);
}

/* User Status - Estilo Discord Simple */
.user-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-top: 12px;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    width: max-content;
    overflow: hidden;
}

.status-icon {
    width: 12px;
    height: 12px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.status-text {
    font-size: 13px;
    font-weight: 400;
    color: var(--text);
    white-space: nowrap;
}

/* Quick Info */
.quick-info {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s;
}

.info-item:active {
    transform: scale(0.98);
}

.info-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent);
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.social-link {
    width: 42px;
    height: 42px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-link svg {
    width: 18px;
    height: 18px;
    fill: var(--text-dim);
    transition: fill 0.3s;
}

.social-link:active {
    transform: scale(0.9);
    border-color: var(--accent);
}

.social-link:active svg {
    fill: var(--accent);
}

/* ===== CONTENT AREA ===== */
.profile-content {
    padding: 24px 20px;
    flex: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Tabs Navigation */
.tabs-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 32px;
    width: 100%;
    max-width: 100%;
}

.tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-dim);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.tab-btn svg {
    width: 18px;
    height: 18px;
}

.tab-btn:active {
    transform: scale(0.98);
}

.tab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 25px var(--accent-glow);
}

.tab-btn.active svg {
    stroke: white;
}

/* Tab Panels */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.4s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Content Header */
.content-header {
    margin-bottom: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    word-break: break-word;
}

.title-line {
    height: 3px;
    width: 60px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px;
}

/* Skills Showcase */
.skills-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.skill-card:active {
    transform: scale(0.95);
}

.skill-card:active::after {
    transform: scaleX(1);
}

.skill-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.skill-name {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    word-break: break-word;
}

/* Gaming Header */
.gaming-header {
    margin-bottom: 32px;
}

.gaming-banner {
    height: 80px;
    background: linear-gradient(135deg, #0d0d0d, #1a0a2e, #0d0d0d);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gaming-pattern {
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(139, 92, 246, 0.03) 8px, rgba(139, 92, 246, 0.03) 16px);
}

.gaming-title {
    font-size: 20px;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 15px var(--accent-glow);
}

/* Trophies Grid */
.trophies-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 36px;
    width: 100%;
    max-width: 100%;
}

.trophy-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.trophy-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, currentColor 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.trophy-box:active .trophy-bg {
    opacity: 0.08;
}

.trophy-box:active {
    transform: scale(0.96);
}

.trophy-icon-large {
    width: 48px;
    height: 48px;
}

.trophy-icon-large svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px currentColor);
}

.trophy-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.trophy-number {
    font-size: 28px;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
}

.trophy-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-dim);
}

.trophy-box.platinum { color: var(--platinum); }
.trophy-box.gold { color: var(--gold); }
.trophy-box.silver { color: var(--silver); }
.trophy-box.bronze { color: var(--bronze); }

/* Games List */
.games-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

.game-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    transition: all 0.3s;
}

.game-item:active {
    transform: scale(0.98);
    border-color: var(--accent);
}

.game-cover {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.game-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.game-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.game-completion {
    font-size: 12px;
    color: var(--gold);
    font-weight: 600;
}

/* ===== DESKTOP - DISEÑO HORIZONTAL ===== */
@media (min-width: 768px) {
    body {
        padding: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .profile-wrapper {
        display: grid;
        grid-template-columns: 320px 1fr;
        max-width: 1200px;
        min-height: 650px;
        border-radius: 16px;
        border: 1px solid var(--border);
    }
    
    .profile-sidebar {
        border-right: 1px solid var(--border);
        border-radius: 16px 0 0 16px;
    }
    
    .profile-banner {
        border-radius: 16px 0 0 0;
    }
    
    .profile-content {
        padding: 32px 36px;
    }
    
    .badge-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .pro-badge:hover {
        background: rgba(255, 215, 0, 0.2);
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    }
    
    .verified-badge:hover {
        background: rgba(59, 130, 246, 0.2);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }
    
    .info-item:hover {
        border-color: var(--accent);
        transform: translateX(4px);
    }
    
    .social-link:hover {
        transform: translateY(-3px);
        border-color: var(--accent);
        box-shadow: 0 6px 20px var(--accent-glow);
    }
    
    .social-link:hover svg {
        fill: var(--accent);
    }
    
    .tab-btn:hover {
        border-color: var(--accent);
    }
    
    .skill-card:hover {
        border-color: var(--accent);
        transform: translateY(-6px);
        box-shadow: 0 8px 25px var(--accent-glow);
    }
    
    .skill-card:hover::after {
        transform: scaleX(1);
    }
    
    .trophy-box:hover {
        border-color: currentColor;
        transform: translateY(-6px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
    
    .trophy-box:hover .trophy-bg {
        opacity: 0.1;
    }
    
    .game-item:hover {
        border-color: var(--accent);
        transform: translateX(6px);
    }
    
    .skills-showcase {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .trophies-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .game-item {
        flex-direction: row;
        padding: 14px;
    }
    
    .game-cover {
        width: 60px;
        height: 80px;
    }
    
    .game-info {
        flex: 1;
    }
}

@media (min-width: 1024px) {
    .profile-wrapper {
        grid-template-columns: 340px 1fr;
        max-width: 1400px;
    }
    
    .profile-content {
        padding: 36px 42px;
    }
}