/* Variables CSS para el nuevo diseño claro/gris/morado */
:root {
  --primary-purple: #8B5CF6;
  --light-purple: #A78BFA;
  --dark-purple: #7C3AED;
  --light-gray: #F8FAFC;
  --medium-gray: #E2E8F0;
  --dark-gray: #64748B;
  --text-dark: #1E293B;
  --text-light: #64748B;
  --white: #FFFFFF;
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-large: 0 10px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--light-gray) 0%, var(--medium-gray) 100%);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}

/* Navegación horizontal superior */
.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--medium-gray);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: var(--shadow-light);
}

.auth-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav .logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-separator {
  color: var(--medium-gray);
  font-size: 1.5rem;
  margin: 0 0.5rem;
}

.nav-tagline {
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 500;
  font-style: italic;
  margin-left: 0;
}

.nav-emoji {
  color: var(--text-light);
  font-size: 1rem;
  font-style: normal;
  margin-left: 0;
}

/* Contenedor principal horizontal */
.main-container {
  margin-top: 0;
  padding: 6rem 2rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Header horizontal */
.header {
  background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
  color: white;
  padding: 3rem 4rem;
  text-align: center;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-large);
  margin-bottom: 2rem;
}

.header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Layout horizontal principal */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  width: 100%;
}

/* Sección de votación horizontal */
.voting-section {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--medium-gray);
}

/* Información del torneo horizontal */
.tournament-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--light-gray);
  padding: 1.5rem 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  border: 1px solid var(--medium-gray);
}

.tournament-info .info-item {
  text-align: center;
}

.tournament-info .info-item .label {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tournament-info .info-item .value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

/* Estilos para la batalla actual en tournament-info */
#current-battle-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.vs-small {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.8rem;
}

.vote-btn-small {
  background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
}

.vote-btn-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Estilos para la batalla en la sección de información */
.battle-layout {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.battle-country {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.battle-separator {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-light);
  margin: 0 0.5rem;
}

.country-flag-large {
  font-size: 2rem;
  display: block;
}

.country-name-small {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
  min-width: 60px;
}

.vote-btn-mini {
  background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
  color: white;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
  font-weight: 600;
  font-size: 0.7rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
  min-width: 50px;
}

.vote-btn-mini:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(139, 92, 246, 0.4);
}

/* Estilos para la nueva sección de batalla actual separada */
.current-battle-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.battle-title {
    text-align: center;
    color: white;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.battle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.battle-participant {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.country-flag-big {
    font-size: 80px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.country-name-big {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.vote-btn-large {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vote-btn-large:hover {
    background: linear-gradient(135deg, #ff5252, #d84315);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.vs-separator-big {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vs-text-big {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #333;
    font-size: 36px;
    font-weight: bold;
    padding: 20px 25px;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.vote-message {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

.vote-count-big {
    color: #ffd700;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 10px 0;
    background: rgba(255, 215, 0, 0.1);
    padding: 8px 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.vote-btn-mini:disabled {
  background: var(--medium-gray);
  color: var(--text-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Batalla activa horizontal */
.active-battle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--white) 0%, var(--light-gray) 100%);
  border-radius: var(--border-radius);
  border: 2px solid var(--medium-gray);
  position: relative;
  overflow: hidden;
}

.active-battle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-purple), var(--light-purple));
}

/* Tarjetas de países horizontales */
.country-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  border: 2px solid var(--medium-gray);
  transition: var(--transition);
  box-shadow: var(--shadow-light);
  min-width: 200px;
  position: relative;
}

.country-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-large);
  border-color: var(--primary-purple);
}

.country-flag {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.country-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.vote-count {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

/* Botones con contraste */
.vote-btn {
  background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-medium);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.vote-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.vote-btn:active {
  transform: translateY(0);
}

.vote-btn:disabled {
  background: var(--medium-gray);
  color: var(--text-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Divisor VS horizontal */
.vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.vs-text {
  background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.5rem;
  box-shadow: var(--shadow-medium);
  border: 3px solid var(--white);
}

/* Sidebar derecha */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-section {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--medium-gray);
}

.sidebar-section h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-purple);
}

/* Timer y progreso horizontal */
.timer {
  text-align: center;
  margin-bottom: 1rem;
}

.timer-display {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-purple);
  font-family: 'Poppins', sans-serif;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--medium-gray);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-purple), var(--light-purple));
  transition: width 1s ease-in-out;
}

/* Autenticación */
.auth-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-toggle {
  background: var(--primary-purple);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
}

.auth-toggle:hover {
  background: var(--dark-purple);
  transform: translateY(-1px);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  border: 1px solid var(--medium-gray);
  box-shadow: var(--shadow-light);
}

.user-votes {
  background: var(--light-purple);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.buy-votes-btn {
  background: transparent;
  color: white;
  border: 1px solid white;
  padding: 0.25rem 0.5rem;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
  margin-left: 0.3rem;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

.buy-votes-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-1px) scale(1.1);
    box-shadow: var(--shadow-medium);
}

/* Modal para comprar votos */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    font-size: 2rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: #ef4444;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin: 0 0 1.5rem 0;
    color: #475569;
    font-size: 1rem;
}

.vote-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.vote-package {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.vote-package:hover {
    border-color: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}

.vote-package:nth-child(2) {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.vote-package:nth-child(3) {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.package-votes {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.package-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #8b5cf6;
    margin-bottom: 0.5rem;
}

.vote-package:nth-child(2) .package-price {
    color: #10b981;
}

.vote-package:nth-child(3) .package-price {
    color: #f59e0b;
}

.package-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 0 12px 0 12px;
}

.vote-package:nth-child(2) .package-badge {
    background: linear-gradient(135deg, #10b981, #059669);
}

.vote-package:nth-child(3) .package-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.payment-info {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.payment-info p {
    margin: 0 0 1rem 0;
    color: #374151;
    font-weight: 600;
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.payment-method {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .vote-packages {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .payment-methods {
        justify-content: center;
    }
}

.logout-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
}

.logout-btn:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

/* Overlay y modal */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.auth-overlay.show {
  display: flex;
}

.auth-panel {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 0;
  box-shadow: var(--shadow-large);
  border: 1px solid var(--medium-gray);
  max-width: 400px;
  width: 90%;
  position: relative;
}

.auth-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--light-gray);
  background: var(--light-gray);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.auth-panel-header h3 {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-medium);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.close-btn:hover {
  background: var(--medium-gray);
  color: var(--text-dark);
}

.auth-form {
  padding: 2rem;
}

/* Estilos para páginas de autenticación separadas */
.auth-page-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-page-panel {
  background: white;
  border-radius: 15px;
  padding: 3rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
  position: relative;
}

.auth-page-panel h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #333;
  font-size: 2rem;
}

.auth-page-panel .form-group {
  margin-bottom: 1.5rem;
}

.auth-page-panel .auth-btn {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
  margin-top: 1rem;
}

.auth-page-panel p {
  text-align: center;
  margin-top: 1.5rem;
  color: #666;
}

.auth-page-panel a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.auth-page-panel a:hover {
  text-decoration: underline;
}

.auth-panel h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Formularios */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--medium-gray);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--light-gray);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-purple);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.auth-btn {
  background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
}

.auth-form .auth-btn {
  width: 100%;
  padding: 1rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

/* Notificaciones */
.notification {
  position: fixed;
  top: 100px;
  right: 2rem;
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-large);
  border-left: 4px solid var(--primary-purple);
  z-index: 3000;
  transform: translateX(400px);
  transition: var(--transition);
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  border-left-color: #10B981;
}

.notification.error {
  border-left-color: #EF4444;
}

/* Responsive horizontal */
@media (max-width: 1200px) {
  .content-wrapper {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }
  
  .voting-section {
    order: 1;
  }
  
  .sidebar {
    order: 2;
    display: flex;
    flex-direction: column;
  }
  
  .sidebar .sidebar-section:nth-child(1) {
    order: 1; /* Timer */
  }
  
  .sidebar .sidebar-section:nth-child(3) {
    order: 2; /* Próximas Batallas */
  }
  
  .sidebar .sidebar-section:nth-child(2) {
    order: 3; /* Batallas Completadas */
  }
  
  .active-battle {
    flex-direction: column;
    gap: 2rem;
  }
  
  .vs-divider {
    transform: rotate(90deg);
  }
}

@media (max-width: 768px) {
  .main-container {
    padding: 2rem 1rem 1rem 1rem;
  }
  
  .content-wrapper {
    margin-top: 3rem;
  }
  
  .header {
    padding: 2rem;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .tournament-info {
    flex-direction: column;
    gap: 1rem;
  }
  
  .active-battle {
    padding: 2rem 1rem;
  }
  
  .country-card {
    min-width: auto;
  }
  
  .nav {
    padding: 0.5rem 1rem;
    flex-wrap: nowrap;
  }
  
  .nav .logo {
    font-size: 1.3rem;
    flex-shrink: 0;
  }
  
  .nav-tagline {
    display: none;
  }
  
  .nav-separator {
    display: none;
  }
  
  .auth-buttons {
    flex-shrink: 0;
    gap: 0.5rem;
  }
  
  /* Botón de cerrar sesión compacto para móvil */
  .logout-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0;
    min-width: 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  
  .logout-btn::before {
    content: "";
    width: 18px;
    height: 18px;
    background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"/><line x1="12" y1="2" x2="12" y2="12"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
  }
  
  .logout-btn:hover::after {
    content: "Cerrar sesión";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    z-index: 1000;
  }
}

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

.disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-purple);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-purple);
}

/* Estilos para batallas - Diseño minimalista estilo Apple */
.upcoming-battle {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.upcoming-battle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-purple), var(--light-purple));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.upcoming-battle:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(255, 255, 255, 0.95);
}

.upcoming-battle:hover::before {
  opacity: 1;
}

.upcoming-battle:last-child {
  margin-bottom: 0;
}

.battle-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.battle-number {
  font-weight: 600;
  color: var(--primary-purple);
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
}

.battle-status {
  font-size: 0.8rem;
  color: var(--text-dark);
  background: transparent;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  box-shadow: none;
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
}

.battle-countries {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.1rem;
      margin: 0.5rem 0;
      padding: 0.25rem;
}

.battle-countries .country-item {
  display: flex;
  align-items: center;
  justify-content: center;
}



.battle-countries .country-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
  letter-spacing: -0.01em;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: center;
  opacity: 1;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.battle-countries .vs-separator {
  font-size: 0.8rem;
  color: #666666;
  font-weight: 300;
  margin: 0;
  opacity: 0.8;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  line-height: 1.2;
}

/* Sección de batallas completadas debajo de la batalla actual */
.completed-battles-section {
  background: var(--white);
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-light);
}

.completed-battles-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.completed-battles-section #completed-battles-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1200px) {
  .completed-battles-section #completed-battles-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .completed-battles-section #completed-battles-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .completed-battles-section #completed-battles-list {
    grid-template-columns: 1fr;
  }
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .battle-countries {
         gap: 0.1rem;
         padding: 0.3rem;
     }
  
  .battle-countries .country-item {
    padding: 0.6rem;
    min-width: 70px;
  }
  
  .battle-countries .country-name {
    font-size: 0.9rem;
  }
  

  
  .battle-countries .vs-separator {
    font-size: 0.85rem;
    margin: 0 0.3rem;
  }
}

@media (min-width: 1200px) {
  .battle-countries {
         gap: 0.1rem;
         padding: 0.4rem;
     }
  
  .battle-countries .country-item {
    padding: 0.75rem;
    min-width: 80px;
  }
  
  .battle-countries .country-name {
    font-size: 1rem;
  }
  

  
  .battle-countries .vs-separator {
    font-size: 0.9rem;
    margin: 0 0.4rem;
  }
}

.battle-time {
  text-align: center;
  padding: 0.75rem;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 10px;
  margin-top: 0.5rem;
}

.battle-time .time-label {
  font-size: 0.85rem;
  color: var(--primary-purple);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
}

.no-battles {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-light);
  background: rgba(248, 250, 252, 0.8);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.6);
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.01em;
}

.no-battles p {
  margin: 0;
  font-style: italic;
}