/* Hytale Giveaway - Estilos inspirados en Hytale */

:root {
    /* Colores principales de Hytale */
    --hytale-blue: #00A8FF;
    --hytale-teal: #4ECDC4;
    --hytale-green: #44CF6C;
    --hytale-gold: #FFD93D;
    --hytale-purple: #9B59B6;
    --hytale-dark: #1A1F3A;
    --hytale-darker: #0D1117;
    --hytale-light: #3DDC97;
    
    /* Colores Específicos del Logo Nuevo */
    --logo-cyan: #29F2FF; /* Cian brillante tipo neón */
    --logo-gold: #FFD700; /* Dorado clásico */
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--hytale-blue), var(--hytale-teal));
    --gradient-success: linear-gradient(135deg, var(--hytale-green), var(--hytale-light));
    --gradient-gold: linear-gradient(135deg, var(--hytale-gold), #F6C90E);
    --gradient-bg: linear-gradient(135deg, #0D1117 0%, #1A1F3A 50%, #2D3561 100%);
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 168, 255, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 168, 255, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 168, 255, 0.4);
    --shadow-glow: 0 0 20px rgba(78, 205, 196, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 4px !important; 
    font-family: 'Minecraft', 'Press Start 2P', monospace !important;
}

body {
    font-family: 'Segoe UI', 'Minecraft', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-bg);
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Partículas de fondo */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 168, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(155, 89, 182, 0.1) 0%, transparent 50%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* --- HEADER --- */
header {
    background: rgba(26, 31, 58, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    border: 2px solid rgba(78, 205, 196, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* --- NUEVO ESTILO DE LOGO (Estilo Imagen Referencia) --- */
.logo-section {
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio entre imagen y texto */
}

/* Imagen Redonda */
.hytale-logo-img {
    width: 60px;
    height: 60px;
    border-radius: 50% !important; /* Redondo */
    border: 2px solid var(--logo-cyan); /* Borde cian fino */
    box-shadow: 0 0 15px rgba(41, 242, 255, 0.4); /* Resplandor suave */
    object-fit: cover;
    image-rendering: pixelated;
}

/* Contenedor del Texto */
.hytale-text-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

/* Texto HYTALE */
.brand-title {
    font-family: 'Press Start 2P', cursive !important;
    font-size: 2rem; /* Grande */
    margin: 0;
    color: var(--logo-cyan);
    text-transform: uppercase;
    letter-spacing: 3px; /* Letras separadas como en la imagen */
    
    /* Efecto de brillo neón sutil */
    text-shadow: 
        0 0 5px rgba(41, 242, 255, 0.5),
        2px 2px 0px #000; /* Sombra dura para legibilidad */
}

/* Texto GIVEAWAY */
.brand-subtitle {
    font-family: 'Press Start 2P', cursive !important;
    font-size: 0.7rem; /* Pequeño */
    color: var(--logo-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center; /* Centrado respecto a HYTALE si es posible */
    margin-top: 2px;
}

/* Usuario */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid var(--hytale-teal);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    border: 2px solid var(--hytale-blue);
    box-shadow: 0 0 15px rgba(0, 168, 255, 0.5);
}

/* Cards */
.card {
    background: rgba(26, 31, 58, 0.8);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    border: 2px solid rgba(78, 205, 196, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--hytale-teal);
}

/* Patrón de bloques */
.block-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 10px, rgba(255, 255, 255, 0.1) 10px, rgba(255, 255, 255, 0.1) 11px),
        repeating-linear-gradient(90deg, transparent, transparent 10px, rgba(255, 255, 255, 0.1) 10px, rgba(255, 255, 255, 0.1) 11px);
    pointer-events: none;
}

/* Card Hero (Login) */
.card-hero {
    text-align: center;
    background: rgba(26, 31, 58, 0.9);
    max-width: 600px;
    margin: 40px auto;
    border: 3px solid var(--hytale-blue);
}

.hero-title {
    font-size: 2.5em;
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3em;
    color: var(--hytale-gold);
    margin-bottom: 30px;
    font-weight: bold;
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.info-badge {
    background: rgba(78, 205, 196, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid var(--hytale-teal);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.badge-icon {
    font-size: 1.2em;
}

.login-text {
    color: #B4B4C8;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.login-footer {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid rgba(78, 205, 196, 0.3);
}

.login-footer p {
    color: var(--hytale-light);
    margin: 10px 0;
    font-weight: 600;
}

/* Botones */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Estilo bloque sólido */
    box-shadow: 0 4px 0 rgba(0,0,0,0.5) !important;
    border: 2px solid #000 !important;
    transform: translateY(0);
}

.btn:active {
    transform: translateY(4px) !important;
    box-shadow: 0 0 0 rgba(0,0,0,0.5) !important;
}

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

.btn-large {
    padding: 18px 40px;
    font-size: 16px;
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #FF6B6B, #EE5A6F);
    color: white;
}

/* Admin Panel */
.card-admin {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.2), rgba(0, 168, 255, 0.2));
    border: 3px solid var(--hytale-purple);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-badge {
    background: var(--hytale-purple);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9em;
}

.admin-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Formularios */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--hytale-teal);
    font-weight: 700;
    font-size: 1.1em;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(13, 17, 23, 0.6);
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--hytale-blue);
    box-shadow: 0 0 20px rgba(0, 168, 255, 0.3);
}

.checkbox-group {
    background: rgba(78, 205, 196, 0.1);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid rgba(78, 205, 196, 0.3);
}

.checkbox-label {
    margin-left: 10px;
    font-size: 1.1em;
}

/* Títulos de sección */
.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    font-size: 2em;
    color: var(--hytale-teal);
}

.title-icon {
    font-size: 1.2em;
}

/* Lista de sorteos */
.raffle-item {
    background: rgba(13, 17, 23, 0.8);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid rgba(78, 205, 196, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.raffle-item:hover {
    border-color: var(--hytale-blue);
    transform: translateX(5px);
    box-shadow: var(--shadow-glow);
}

.raffle-info h3 {
    color: var(--hytale-gold);
    margin-bottom: 10px;
    font-size: 1.5em;
}

.raffle-meta {
    color: #B4B4C8;
    line-height: 1.6;
}

.raffle-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Estadísticas */
.stats {
    margin-bottom: 30px;
}

.stat-box {
    background: rgba(78, 205, 196, 0.1);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid var(--hytale-teal);
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--hytale-teal);
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-number {
    display: block;
    font-size: 3em;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Participantes */
.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.participant-item {
    background: rgba(13, 17, 23, 0.6);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid rgba(78, 205, 196, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.participant-item:hover {
    border-color: var(--hytale-blue);
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

.participant-avatar {
    width: 50px;
    height: 50px;
    border-radius: 4px !important; /* Cuadrado pixel art */
    border: 2px solid var(--hytale-teal);
}

.participant-details h4 {
    color: var(--hytale-light);
    margin-bottom: 5px;
    font-size: 1em;
}

.participant-details p {
    color: #B4B4C8;
    font-size: 0.8em;
}

/* Ganador */
.card-winner {
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.2), rgba(68, 207, 108, 0.2));
    border: 4px solid var(--hytale-gold);
    animation: pulse-winner 2s infinite;
}

@keyframes pulse-winner {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 217, 61, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 217, 61, 0.8); }
}

.winner-decoration {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 217, 61, 0.1) 10px, rgba(255, 217, 61, 0.1) 20px);
    pointer-events: none;
}

.winner-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 30px;
    color: var(--hytale-gold);
    text-shadow: 0 0 20px rgba(255, 217, 61, 0.5);
    animation: glow 1.5s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 217, 61, 0.5); }
    50% { text-shadow: 0 0 40px rgba(255, 217, 61, 1); }
}

.winner-display {
    text-align: center;
    padding: 40px;
    position: relative;
    z-index: 1;
}

.winner-avatar {
    width: 150px;
    height: 150px;
    border-radius: 4px !important;
    border: 5px solid var(--hytale-gold);
    margin: 0 auto 30px;
    display: block;
    box-shadow: 0 0 50px rgba(255, 217, 61, 0.8);
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.winner-name {
    font-size: 3em;
    font-weight: bold;
    color: var(--hytale-gold);
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(255, 217, 61, 0.5);
}

.winner-discord {
    font-size: 1.5em;
    color: var(--hytale-light);
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--hytale-dark);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 3px solid var(--hytale-teal);
    box-shadow: var(--shadow-lg);
}

.loader {
    border: 4px solid rgba(78, 205, 196, 0.3);
    border-top: 4px solid var(--hytale-teal);
    border-radius: 50%;
    width: 60px; height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Utilidades */
.hidden { display: none !important; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #B4B4C8;
}

.empty-state::before {
    content: "📦";
    display: block;
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .logo-text { font-size: 2em; letter-spacing: 4px; }
    .logo-subtitle { font-size: 0.8em; }
    .header-content { flex-direction: column; text-align: center; }
    .card { padding: 25px; }
    .hero-title { font-size: 2em; }
    .admin-actions, .raffle-actions { flex-direction: column; }
    .participants-grid { grid-template-columns: 1fr; }
    .btn { width: 100%; justify-content: center; }
    
    /* Ajuste Header Móvil */
    .logo-section { flex-direction: column; gap: 10px; }
    .brand-title { font-size: 2rem; }
}

/* Animaciones adicionales */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card { animation: fadeIn 0.5s ease-out; }