/* Variables de diseño */
:root {
    --primary: #6a0dad;
    --primary-dark: #4b0082;
    --primary-light: #9370db;
    --secondary: #0d0221;
    --accent: #ff00ff;
    --text: #ffffff;
    --text-muted: #cccccc;
    --success: #4CAF50;
    --warning: #ff9800;
    --error: #f44336;
    --radius: 12px;
    --transition: all 0.3s ease;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utilidades */
.container {
    width: min(90%, 1200px);
    margin: 0 auto;
    padding: 0 1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Header */
.header {
    background: rgba(13, 2, 33, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--primary-light);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: var(--accent);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    gap: 0.5rem;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
}

.btn--primary {
    background: var(--primary);
    color: var(--text);
}

.btn--primary:hover {
    background: transparent;
    border-color: var(--primary);
}

.btn--secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--primary-light);
}

.btn--secondary:hover {
    background: var(--primary-light);
    color: var(--secondary);
}

.btn--accent {
    background: var(--accent);
    color: var(--text);
}

.btn--accent:hover {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 4rem 0;
    min-height: 85vh;
    align-items: center;
}

@media (min-width: 768px) {
    .hero {
        grid-template-columns: 1fr 1fr;
    }
}

.hero__content h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.hero__content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.planet {
    width: min(200px, 40vw);
    height: min(200px, 40vw);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--primary), var(--primary-dark));
    box-shadow: 0 0 50px var(--primary);
    position: relative;
    animation: rotate 20s linear infinite;
}

.moon {
    width: min(60px, 12vw);
    height: min(60px, 12vw);
    border-radius: 50%;
    background: var(--text-muted);
    position: absolute;
    top: 20%;
    right: 20%;
    animation: orbit 15s linear infinite;
}

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

@keyframes orbit {
    to { transform: rotate(360deg) translateX(150px) rotate(-360deg); }
}

/* Secciones */
.section {
    padding: 4rem 0;
}

.section__title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 1rem;
}

.section__subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Torneos */
.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
}

.tournament-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.tournament-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(106, 13, 173, 0.3);
}

.tournament-header {
    margin-bottom: 1rem;
}

.tournament-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tournament-badge.active {
    background: var(--success);
    color: white;
}

.tournament-badge.upcoming {
    background: var(--warning);
    color: black;
}

.tournament-badge.finished {
    background: var(--error);
    color: white;
}

.tournament-prize {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-light);
    font-weight: 600;
}

.tournament-info {
    margin-bottom: 1.5rem;
}

.tournament-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* Eventos PvP */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 2rem;
}

.event-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.event-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.event-icon {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.event-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.event-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.event-schedule {
    list-style: none;
    text-align: left;
}

.event-schedule li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* Clanes */
.clans-leaderboard {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.clan-rank {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.clan-rank:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.rank-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
    min-width: 40px;
}

.clan-info h3 {
    margin-bottom: 0.25rem;
}

.clan-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.clan-stats {
    display: flex;
    gap: 1rem;
}

.clan-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.clan-score {
    margin-left: auto;
    font-weight: 700;
    color: var(--primary-light);
}

.clans-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Premios y Sorteos */
.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
}

.reward-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 0, 255, 0.2);
}

.reward-header {
    background: rgba(106, 13, 173, 0.3);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.reward-header i {
    font-size: 2rem;
    color: var(--accent);
}

.reward-header h3 {
    margin: 0;
}

.reward-content {
    padding: 1.5rem;
}

.reward-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.reward-content ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.reward-content li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.reward-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--accent);
    font-size: 1.1rem;
}

/* Creadores */
.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 2rem;
}

.creator-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.creator-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.creator-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

.creator-role {
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 1rem;
}

.creator-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.creator-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.creator-social a {
    color: var(--text);
    font-size: 1.2rem;
    transition: var(--transition);
}

.creator-social a:hover {
    color: var(--accent);
}

/* Top Jugadores */
.players-leaderboard {
    max-width: 800px;
    margin: 0 auto;
}

.player-rank {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.player-rank:hover {
    background: rgba(255, 255, 255, 0.08);
}

.rank-badge {
    background: var(--accent);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.rank-number {
    width: 40px;
    text-align: center;
    font-weight: 700;
    color: var(--primary-light);
}

.player-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.player-info {
    flex: 1;
}

.player-info h3 {
    margin-bottom: 0.25rem;
}

.player-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.player-stats {
    font-weight: 700;
    color: var(--primary-light);
}

/* Top 3 especiales */
.top-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), transparent);
    border: 1px solid gold;
}

.top-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), transparent);
    border: 1px solid silver;
}

.top-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), transparent);
    border: 1px solid #cd7f32;
}

/* Rangos (sección mantenida) */
.ranks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
}

.rank {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rank:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(106, 13, 173, 0.3);
}

.rank--featured {
    border: 2px solid var(--accent);
    transform: scale(1.05);
}

.rank--featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.rank__badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--accent);
    color: var(--text);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.rank__header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rank__name {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.rank__price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.rank__price span {
    font-size: 1rem;
    color: var(--text-muted);
}

.rank__features {
    list-style: none;
    margin-bottom: 2rem;
}

.rank__feature {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.rank__feature i {
    margin-right: 0.5rem;
    width: 20px;
}

.fa-check {
    color: var(--success);
}

.fa-times {
    color: var(--error);
}

/* Carrusel (mantenido) */
.carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel__track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel__slide {
    min-width: 100%;
    position: relative;
}

.carousel__image {
    width: 100%;
    height: min(500px, 50vh);
    object-fit: cover;
    display: block;
}

.carousel__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1.5rem;
}

.carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel__nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel__nav--prev {
    left: 1rem;
}

.carousel__nav--next {
    right: 1rem;
}

.carousel__indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.carousel__indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel__indicator.active {
    background: var(--accent);
}

/* Footer */
.footer {
    background: rgba(13, 2, 33, 0.9);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--primary-light);
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer__section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer__info p {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.ip-address {
    color: var(--primary-light);
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--text);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.streamer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.streamer-link {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    padding: 0.25rem 0;
}

.streamer-link:hover {
    color: var(--primary-light);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Estados de carga */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        text-align: center;
    }
    
    .hero__actions {
        justify-content: center;
    }
    
    .carousel__nav {
        width: 40px;
        height: 40px;
    }
    
    .rank--featured {
        transform: none;
    }
    
    .clan-rank {
        flex-wrap: wrap;
    }
    
    .player-rank {
        flex-wrap: wrap;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 3rem 0;
    }
    
    .nav {
        justify-content: center;
    }
    
    .hero__actions .btn {
        width: 100%;
    }
    
    .clans-actions .btn {
        width: 100%;
    }
}