/* Reset y variables CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), #f97316);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-dark);
    overflow-x: hidden;
    /* Mejorar experiencia táctil en móviles */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Permitir selección de texto en inputs y elementos de texto */
input, textarea, .participant-item, .winner-name, .company-name, .prize-name, .prize-description {
    -webkit-user-select: text;
    user-select: text;
}

/* Mejorar botones táctiles */
button, .btn, .tab-button, .theme-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px; /* Tamaño mínimo recomendado para táctil */
    cursor: pointer;
}

/* Mejorar inputs táctiles */
input[type="text"], input[type="number"], input[type="range"], select {
    touch-action: manipulation;
    min-height: 44px;
}

/* Viewport meta para asegurar diseño responsivo */
@viewport {
    width: device-width;
    zoom: 1.0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Panel de control */
.control-panel {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Tabs */
.control-tabs {
    display: flex;
    background: var(--bg-white);
    border-radius: 15px;
    padding: 5px;
    box-shadow: var(--shadow-md);
    gap: 5px;
    width: 100%;
    box-sizing: border-box;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
}

.tab-button:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.tab-button.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.participants-section,
.customize-section,
.settings-section {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.participants-section h3,
.customize-section h3,
.settings-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.participants-section h3 i,
.customize-section h3 i,
.settings-section h3 i {
    color: var(--primary-color);
}

/* Setting Groups */
.setting-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.setting-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.setting-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-group label i {
    color: var(--primary-color);
}

.setting-group input[type="text"],
.setting-group input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.setting-group input[type="text"]:focus,
.setting-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Theme Selector */
.theme-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.theme-btn {
    background: var(--bg-light);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.theme-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.theme-btn.active {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.theme-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.default-theme { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.corporate-theme { background: linear-gradient(135deg, #1e40af 0%, #3730a3 100%); }
.vibrant-theme { background: linear-gradient(135deg, #ec4899 0%, #f97316 100%); }
.nature-theme { background: linear-gradient(135deg, #059669 0%, #065f46 100%); }
.sunset-theme { background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%); }
.ocean-theme { background: linear-gradient(135deg, #0ea5e9 0%, #075985 100%); }

.theme-btn span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Logo Upload */
.logo-upload {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.btn-upload,
.btn-reset,
.btn-add-color,
.btn-save,
.btn-export,
.btn-import {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-upload,
.btn-save,
.btn-export,
.btn-import {
    background: var(--gradient-primary);
    color: white;
}

.btn-reset,
.btn-add-color {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid #e5e7eb;
}

.btn-upload:hover,
.btn-save:hover,
.btn-export:hover,
.btn-import:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-reset:hover,
.btn-add-color:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.logo-preview {
    text-align: center;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 10px;
    border: 2px dashed #d1d5db;
}

.logo-preview img {
    max-width: 200px;
    max-height: 80px;
    object-fit: contain;
}

/* Prize Upload */
.prize-upload {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.prize-preview {
    text-align: center;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 10px;
    border: 2px dashed #d1d5db;
    margin-top: 10px;
}

.prize-preview img {
    max-width: 200px;
    max-height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.setting-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    resize: vertical;
    min-height: 50px;
    font-family: inherit;
}

.setting-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Color Palette - Diseño Moderno */
.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.color-palette::-webkit-scrollbar {
    width: 6px;
}

.color-palette::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.color-palette::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    border-radius: 3px;
}

.color-palette::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.color-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    padding: 6px 12px 6px 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    min-width: 80px;
    cursor: pointer;
    animation: slideInScale 0.4s ease-out forwards;
    transform: scale(0.8) translateY(10px);
    opacity: 0;
}

@keyframes slideInScale {
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.color-item:nth-child(1) { animation-delay: 0.05s; }
.color-item:nth-child(2) { animation-delay: 0.1s; }
.color-item:nth-child(3) { animation-delay: 0.15s; }
.color-item:nth-child(4) { animation-delay: 0.2s; }
.color-item:nth-child(5) { animation-delay: 0.25s; }
.color-item:nth-child(6) { animation-delay: 0.3s; }
.color-item:nth-child(7) { animation-delay: 0.35s; }
.color-item:nth-child(8) { animation-delay: 0.4s; }

.color-item:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.color-picker {
    width: 32px;
    height: 32px;
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    margin-right: 8px;
    position: relative;
    overflow: hidden;
}

.color-picker:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.color-picker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.color-picker:active::before {
    width: 100%;
    height: 100%;
}

.color-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
    transition: color 0.3s ease;
}

.color-item:hover .color-label {
    color: #475569;
}

.color-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    opacity: 0;
    transform: scale(0.8);
}

.color-item:hover .color-remove {
    opacity: 1;
    transform: scale(1);
}

.color-remove:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Botones de control de paleta - Diseño mejorado */
.palette-controls {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-add-color,
.btn-reset {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
    min-width: 120px;
    justify-content: center;
}

.btn-add-color {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-add-color::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-add-color:hover::before {
    left: 100%;
}

.btn-add-color:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
}

.btn-reset {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-reset:hover {
    background: #f8fafc;
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.btn-add-color:active {
    transform: translateY(0);
}

.btn-reset:active {
    transform: translateY(0);
}

/* Sliders */
.slider-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.slider-group input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: var(--secondary-color);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.slider-group span {
    min-width: 60px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
}

/* Range Groups */
.range-group {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.range-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.range-control label {
    min-width: 120px;
    font-weight: 600;
    color: var(--text-dark);
}

.range-control input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.range-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-control input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-display {
    min-width: 60px;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.range-group {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.range-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.range-input label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}

.range-input input {
    margin-bottom: 0;
}

/* Toggle Switches */
.toggle-group {
    margin-bottom: 15px;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.toggle-label {
    font-weight: 500;
    color: var(--text-dark);
}

/* Config Buttons */
.config-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

#participantInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 0;
    box-sizing: border-box;
}

#participantInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--bg-white);
}

.btn-add {
    padding: 15px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    min-width: 60px;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.participants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

.participants-list:empty::before {
    content: "Agrega participantes para comenzar...";
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 80px;
    font-style: italic;
}

.participant-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.3s ease;
}

.participant-tag .remove-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.2s ease;
}

.participant-tag .remove-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.participants-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.participants-counter {
    padding: 10px 15px;
    background: var(--bg-light);
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-dark);
    border: 1px solid #e5e7eb;
    flex: 1;
}

.participants-counter span {
    color: var(--primary-color);
    font-weight: 600;
}

.btn-clear-all {
    padding: 10px 15px;
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-clear-all:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    background: linear-gradient(45deg, #dc2626, #b91c1c);
}

.btn-clear-all:active {
    transform: translateY(0);
}

.btn-clear-all:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-clear-all i {
    font-size: 0.9rem;
}

/* Estructura principal de la ruleta con paneles laterales */
.main-roulette-area {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
}

.main-roulette-area.hide-panels {
    grid-template-columns: 1fr;
}

.main-roulette-area.hide-panels .side-panel {
    display: none;
}

/* Paneles laterales */
.side-panel {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.side-panel h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Panel de empresa y premio (izquierdo) */
.left-panel .company-logo-display {
    text-align: center;
    margin-bottom: 20px;
}

.left-panel #sideCompanyLogo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Fallback para logo cuando no carga */
.logo-fallback {
    width: 160px;
    height: 160px;
    border-radius: 15px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    margin-bottom: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.logo-fallback i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.logo-fallback span {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
}

.company-info .company-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 0;
    text-align: center;
    margin-top: 0;
}

/* Separador entre logo y premio */
.panel-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    margin: 20px 0;
}

/* Premio en panel izquierdo */
.left-panel .prize-display {
    text-align: center;
}

.left-panel .prize-image-container {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin: 0 auto 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.left-panel .prize-image-container #prizeImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.left-panel .prize-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.left-panel .prize-placeholder i {
    font-size: 3rem;
    color: var(--accent-color);
}

.left-panel .prize-info .prize-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.3;
    text-align: center;
}

.left-panel .prize-info .prize-description {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 0;
    text-align: center;
}

/* Panel de eliminados (derecho) */
.right-panel .eliminated-section h4 {
    color: var(--danger-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.eliminated-list-side {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

/* Scrollbar personalizado para eliminados */
.eliminated-list-side::-webkit-scrollbar {
    width: 6px;
}

.eliminated-list-side::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.eliminated-list-side::-webkit-scrollbar-thumb {
    background: var(--danger-color);
    border-radius: 3px;
}

.eliminated-list-side::-webkit-scrollbar-thumb:hover {
    background: #dc2626;
}

.eliminated-item-side {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.eliminated-item-side i {
    color: var(--danger-color);
    font-size: 0.8rem;
}

.elimination-counter-side {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.elimination-counter-side span {
    font-weight: 600;
    color: var(--danger-color);
}

.no-eliminated {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    color: var(--text-light);
    text-align: center;
    gap: 10px;
}

.no-eliminated i {
    font-size: 2rem;
    color: var(--text-light);
    opacity: 0.5;
}

.no-eliminated span {
    font-size: 0.9rem;
}

/* Ruleta - actualizado para la nueva estructura */
.roulette-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

.roulette-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Participantes eliminados */
.eliminated-container {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    max-width: 250px;
    min-width: 200px;
}

.eliminated-container h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--danger-color);
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    justify-content: center;
}

.eliminated-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.eliminated-list-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.eliminated-item {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    animation: eliminationFadeIn 0.5s ease;
    position: relative;
    overflow: hidden;
}

.eliminated-item-compact {
    background: var(--danger-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    animation: eliminationFadeIn 0.5s ease;
}

.eliminated-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.eliminated-item:hover::before {
    left: 100%;
}

.elimination-counter {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.round-info {
    text-align: center;
    margin-top: 10px;
    padding: 8px 15px;
    background: var(--bg-light);
    border-radius: 20px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Configuración de eliminación */
.elimination-settings {
    margin-top: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.elimination-settings small {
    display: block;
    margin-top: 5px;
    color: var(--text-light);
    font-style: italic;
}

.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.pointer-triangle {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid var(--accent-color);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.roulette {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    position: relative;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    background: var(--bg-white);
    border: 8px solid var(--bg-white);
}

.roulette-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.center-circle {
    width: 60px;
    height: 60px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 4px solid var(--bg-white);
}

.roulette-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
    transform-origin: center;
}

.segment-text-container {
    pointer-events: none;
    user-select: none;
}

.segment-text {
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    text-align: center;
    pointer-events: none;
    user-select: none;
    line-height: 1;
    letter-spacing: 0.5px;
    font-family: 'Poppins', sans-serif;
}

/* Botón de girar */
.spin-button-container {
    display: flex;
    justify-content: center;
}

.spin-button {
    padding: 20px 40px;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-accent);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
    justify-content: center;
}

.spin-button:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.spin-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.spin-button.spinning {
    background: var(--danger-color);
    animation: pulse 1s infinite;
}

/* Contador simple en el centro */
.center-countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-countdown span {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.countdown-pulse {
    animation: simplePulse 0.5s ease-in-out;
}

@keyframes simplePulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Resultado */
.result-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.result-container.show {
    opacity: 1;
    visibility: visible;
}

.result-content {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.5s ease;
}

.result-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--success-color);
}

.winner-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 15px;
    border: 3px solid var(--primary-color);
}

.btn-new-game {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.btn-new-game:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Modal de confirmación personalizado */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    margin: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
}

.modal-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.modal-icon i {
    font-size: 24px;
    color: white;
}

.modal-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.modal-body {
    padding: 30px 25px;
    text-align: center;
}

.modal-body p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.modal-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #92400e;
    font-size: 0.9rem;
}

.modal-warning i {
    color: #f59e0b;
    font-size: 1rem;
}

.modal-footer {
    padding: 20px 25px 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-cancel, .btn-confirm {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-cancel:hover {
    background: #e5e7eb;
    color: #4b5563;
    transform: translateY(-1px);
}

.btn-confirm {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-confirm:hover {
    background: linear-gradient(45deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.btn-cancel:active, .btn-confirm:active {
    transform: translateY(0);
}

/* Animación de entrada del modal */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Footer */
.footer {
    margin-top: 20px;
    text-align: center;
    color: var(--text-light);
}

/* ===== ZONAS PUBLICITARIAS ===== */
.ad-zone {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    min-height: 90px;
    background: var(--bg-light);
    border-radius: 10px;
    border: 2px dashed #d1d5db;
    transition: all 0.3s ease;
}

.ad-zone:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.ad-header {
    margin: 15px 0 25px 0;
    min-height: 90px;
}

.ad-middle {
    margin: 30px 0;
    min-height: 100px;
}

.ad-footer {
    margin: 20px 0 15px 0;
    min-height: 90px;
}

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.7;
}

/* AdSense responsive styles */
.adsbygoogle {
    display: block !important;
    margin: 0 auto;
}

/* Ocultar placeholders cuando hay anuncios reales */
.ad-zone:has(.adsbygoogle) .ad-placeholder {
    display: none;
}

/* Responsive ads */
@media (max-width: 768px) {
    .ad-zone {
        margin: 15px 0;
        min-height: 70px;
    }
    
    .ad-header {
        margin: 10px 0 20px 0;
        min-height: 70px;
    }
    
    .ad-middle {
        margin: 20px 0;
        min-height: 80px;
    }
    
    .ad-footer {
        margin: 15px 0 10px 0;
        min-height: 70px;
    }
    
    .ad-placeholder {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .ad-zone {
        margin: 10px 0;
        min-height: 60px;
        border-radius: 8px;
    }
    
    .ad-header {
        margin: 8px 0 15px 0;
    }
    
    .ad-middle {
        margin: 15px 0;
    }
    
    .ad-footer {
        margin: 12px 0 8px 0;
    }
    
    .ad-placeholder {
        font-size: 0.75rem;
    }
}

.footer {
    text-align: center;
    padding: 20px;
    color: white;
    opacity: 0.8;
}

/* Canvas de confetti */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes eliminationFadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes segmentElimination {
    0% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.5;
        filter: brightness(0.5) grayscale(1);
        transform: scale(0.95);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* ===== RESPONSIVO COMPLETO ===== */

/* Desktop grande (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        padding: 30px;
    }
    
    .title {
        font-size: 3rem;
    }
    
    .roulette {
        width: 450px;
        height: 450px;
    }
    
    .side-panel {
        padding: 30px;
    }
    
    .left-panel #sideCompanyLogo {
        width: 140px;
        height: 140px;
    }
    
    .left-panel .prize-image-container {
        width: 140px;
        height: 140px;
    }
}

/* Tablet landscape (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .container {
        padding: 25px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .roulette {
        width: 380px;
        height: 380px;
    }
    
    .side-panel {
        padding: 25px;
    }
    
    .left-panel #sideCompanyLogo {
        width: 110px;
        height: 110px;
    }
    
    .left-panel .prize-image-container {
        width: 110px;
        height: 110px;
    }
}

/* Tablet portrait (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .title {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
    
    .main-roulette-area {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "left-panel"
            "roulette-panel" 
            "right-panel";
        gap: 25px;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .left-panel {
        grid-area: left-panel;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }
    
    .company-logo-display {
        text-align: center;
    }
    
    .prize-display {
        text-align: center;
    }
    
    .panel-separator {
        display: none;
    }
    
    .roulette-container {
        grid-area: roulette-panel;
    }
    
    .roulette {
        width: 350px;
        height: 350px;
    }
    
    .right-panel {
        grid-area: right-panel;
    }
    
    .side-panel {
        padding: 20px;
    }
    
    .left-panel #sideCompanyLogo {
        width: 100px;
        height: 100px;
    }
    
    .left-panel .prize-image-container {
        width: 100px;
        height: 100px;
    }
}

/* Mobile landscape (481px - 767px) */
@media (max-width: 767px) and (min-width: 481px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .main-roulette-area {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "left-panel"
            "roulette-panel" 
            "right-panel";
        gap: 20px;
    }
    
    .left-panel {
        grid-area: left-panel;
        display: flex;
        justify-content: space-around;
        align-items: flex-start;
        text-align: center;
        padding: 15px;
    }
    
    .company-logo-display,
    .prize-display {
        flex: 1;
        max-width: 45%;
    }
    
    .panel-separator {
        display: none;
    }
    
    .roulette-container {
        grid-area: roulette-panel;
    }
    
    .roulette {
        width: 300px;
        height: 300px;
    }
    
    .right-panel {
        grid-area: right-panel;
    }
    
    .side-panel {
        padding: 15px;
    }
    
    .left-panel #sideCompanyLogo {
        width: 80px;
        height: 80px;
        padding: 10px;
    }
    
    .left-panel .prize-image-container {
        width: 80px;
        height: 80px;
    }
    
    .company-info .company-name {
        font-size: 0.9rem;
    }
    
    .left-panel .prize-info .prize-name {
        font-size: 0.85rem;
    }
    
    .left-panel .prize-info .prize-description {
        font-size: 0.75rem;
    }
    
    .spin-button {
        padding: 12px 25px;
        font-size: 1.1rem;
        min-width: 160px;
    }
    
    .participants-section {
        padding: 15px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-add {
        width: 100%;
        padding: 12px;
    }
}

/* Mobile portrait (hasta 480px) */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 1.6rem;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .main-roulette-area {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "left-panel"
            "roulette-panel" 
            "right-panel";
        gap: 15px;
    }
    
    .left-panel {
        grid-area: left-panel;
        display: block;
        text-align: center;
        padding: 12px;
    }
    
    .company-logo-display {
        margin-bottom: 15px;
    }
    
    .prize-display {
        margin-top: 15px;
    }
    
    .panel-separator {
        display: block;
        margin: 15px 0;
    }
    
    .roulette-container {
        grid-area: roulette-panel;
    }
    
    .roulette {
        width: 260px;
        height: 260px;
    }
    
    .right-panel {
        grid-area: right-panel;
    }
    
    .side-panel {
        padding: 12px;
    }
    
    .left-panel #sideCompanyLogo {
        width: 70px;
        height: 70px;
        padding: 8px;
    }
    
    .left-panel .prize-image-container {
        width: 70px;
        height: 70px;
    }
    
    .company-info .company-name {
        font-size: 0.85rem;
    }
    
    .left-panel .prize-info .prize-name {
        font-size: 0.8rem;
    }
    
    .left-panel .prize-info .prize-description {
        font-size: 0.7rem;
        line-height: 1.2;
    }
    
    .spin-button {
        padding: 10px 20px;
        font-size: 1rem;
        min-width: 140px;
    }
    
    .participants-section {
        padding: 12px;
    }
    
    .participants-section h3 {
        font-size: 1.2rem;
    }
    
    .input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-add {
        width: 100%;
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .participant-item {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .participant-item button {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    /* Ajustes para el modal en móviles */
    .modal-content {
        padding: 20px;
        margin: 20px;
        max-width: calc(100vw - 40px);
    }
    
    .modal-content h3 {
        font-size: 1.3rem;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-buttons button {
        width: 100%;
    }
    
    /* Resultados responsivos */
    .result-content {
        padding: 20px 15px;
    }
    
    .result-content h2 {
        font-size: 1.5rem;
    }
    
    .winner-name {
        font-size: 1.2rem;
        word-break: break-word;
    }
}

/* Extra small devices (hasta 320px) */
@media (max-width: 320px) {
    .container {
        padding: 8px;
    }
    
    .title {
        font-size: 1.4rem;
    }
    
    .roulette {
        width: 220px;
        height: 220px;
    }
    
    .left-panel #sideCompanyLogo {
        width: 60px;
        height: 60px;
        padding: 6px;
    }
    
    .left-panel .prize-image-container {
        width: 60px;
        height: 60px;
    }
    
    .company-info .company-name {
        font-size: 0.8rem;
    }
    
    .left-panel .prize-info .prize-name {
        font-size: 0.75rem;
    }
    
    .left-panel .prize-info .prize-description {
        font-size: 0.65rem;
    }
    
    .spin-button {
        padding: 8px 16px;
        font-size: 0.9rem;
        min-width: 120px;
    }
}

/* ===== PANEL DE CONFIGURACIÓN RESPONSIVO ===== */

/* Tablet portrait y menor (768px-) */
@media (max-width: 768px) {
    .control-panel {
        padding: 15px;
        margin: 0;
    }
    
    .control-tabs {
        flex-direction: column;
        gap: 3px;
        padding: 3px;
        border-radius: 12px;
    }
    
    .tab-button {
        padding: 12px 15px;
        text-align: center;
        font-size: 0.85rem;
        border-radius: 8px;
        justify-content: center;
    }
    
    .tab-button i {
        margin-right: 8px;
    }
    
    .participants-section,
    .customize-section,
    .settings-section {
        padding: 15px;
        border-radius: 12px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .participants-section h3,
    .customize-section h3,
    .settings-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .setting-group {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    .setting-group label {
        margin-bottom: 10px;
        font-size: 0.9rem;
        text-align: center;
        justify-content: center;
    }
    
    .setting-group input[type="text"],
    .setting-group input[type="number"] {
        padding: 10px 12px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Input group para participantes */
    .input-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .input-group input {
        width: 100%;
        padding: 12px 15px;
        border-radius: 8px;
        border: 2px solid #e5e7eb;
        font-size: 0.9rem;
        box-sizing: border-box;
    }
    
    .btn-add {
        width: 100%;
        padding: 12px;
        border-radius: 8px;
        font-size: 0.9rem;
    }
    
    /* Lista de participantes */
    .participants-list {
        max-height: 200px;
        overflow-y: auto;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .participant-item {
        margin-bottom: 8px;
        padding: 8px 12px;
        font-size: 0.85rem;
        border-radius: 6px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Acciones de participantes */
    .participants-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
        width: 100%;
    }
    
    .participants-counter {
        font-size: 0.9rem;
        text-align: center;
    }
    
    .btn-clear-all {
        width: 100%;
        max-width: 200px;
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    /* Controles en línea se vuelven verticales */
    .control-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .control-item {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    /* Botones del panel de personalización */
    .theme-buttons, .theme-selector {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
    }
    
    .theme-btn {
        padding: 10px 8px;
        font-size: 0.8rem;
        text-align: center;
    }
    
    .color-palette {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        width: 100%;
        max-width: none;
    }
    
    .color-item {
        margin: 0;
        aspect-ratio: 1;
    }
    
    /* Configuración de empresa y premio */
    .logo-upload-area,
    .prize-upload-area {
        padding: 12px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .upload-buttons {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .upload-buttons button {
        width: 100%;
        padding: 10px;
        font-size: 0.85rem;
    }
}

/* Mobile landscape (481px - 767px) */
@media (max-width: 767px) and (min-width: 481px) {
    .container {
        padding: 12px;
    }
    
    .control-panel {
        padding: 10px;
        margin: 0;
    }
    
    .control-tabs {
        flex-direction: row;
        overflow-x: auto;
        gap: 2px;
        padding: 2px;
        border-radius: 10px;
        /* Permitir scroll horizontal si es necesario */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .control-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-button {
        padding: 10px 12px;
        font-size: 0.75rem;
        border-radius: 6px;
        min-width: fit-content;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .tab-button i {
        margin-right: 6px;
        font-size: 0.8rem;
    }
    
    .participants-section,
    .customize-section,
    .settings-section {
        padding: 12px;
        border-radius: 10px;
    }
    
    .input-group {
        flex-direction: row;
        gap: 8px;
        align-items: stretch;
    }
    
    .input-group input {
        flex: 1;
        min-width: 0;
    }
    
    .btn-add {
        width: auto;
        min-width: 50px;
        padding: 0 15px;
    }
    
    .participants-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .btn-clear-all {
        width: auto;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .theme-buttons, .theme-selector {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .color-palette {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    
    /* Sliders y controles más compactos */
    .range-control {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .range-display {
        text-align: center;
        font-weight: 600;
        font-size: 0.85rem;
    }
}

/* Mobile portrait (hasta 480px) */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .control-panel {
        padding: 8px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .control-tabs {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 2px;
        border-radius: 8px;
        width: 100%;
    }
    
    .tab-button {
        padding: 12px 16px;
        font-size: 0.8rem;
        border-radius: 6px;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .tab-button i {
        margin-right: 8px;
        font-size: 0.9rem;
    }
    
    .participants-section,
    .customize-section,
    .settings-section {
        padding: 12px;
        border-radius: 10px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .participants-section h3,
    .customize-section h3,
    .settings-section h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
        text-align: center;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }
    
    .setting-group {
        margin-bottom: 15px;
        padding-bottom: 10px;
        width: 100%;
    }
    
    .setting-group label {
        margin-bottom: 8px;
        font-size: 0.85rem;
        text-align: center;
        justify-content: center;
        flex-direction: row;
        gap: 6px;
    }
    
    .setting-group input[type="text"],
    .setting-group input[type="number"],
    .setting-group select {
        padding: 10px 12px;
        font-size: 0.85rem;
        border-radius: 6px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Input group para participantes */
    .input-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .input-group input {
        width: 100%;
        padding: 12px 15px;
        border-radius: 6px;
        border: 2px solid #e5e7eb;
        font-size: 0.85rem;
        box-sizing: border-box;
    }
    
    .btn-add {
        width: 100%;
        padding: 12px;
        border-radius: 6px;
        font-size: 0.85rem;
    }
    
    /* Lista de participantes */
    .participants-list {
        max-height: 180px;
        overflow-y: auto;
        margin-bottom: 12px;
        width: 100%;
        padding-right: 5px;
    }
    
    .participant-item {
        margin-bottom: 6px;
        padding: 8px 10px;
        font-size: 0.8rem;
        border-radius: 5px;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .participant-item button {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
        border-radius: 4px;
        margin-left: 8px;
        flex-shrink: 0;
    }
    
    /* Acciones de participantes */
    .participants-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
        width: 100%;
    }
    
    .participants-counter {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .btn-clear-all {
        width: 100%;
        max-width: 180px;
        padding: 10px 12px;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    
    /* Checkboxes y switches más grandes */
    .checkbox-group,
    .switch-group {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
        width: 100%;
    }
    
    /* Tema buttons en móvil */
    .theme-buttons, .theme-selector {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        width: 100%;
    }
    
    .theme-btn {
        padding: 8px 6px;
        font-size: 0.75rem;
        border-radius: 6px;
        text-align: center;
    }
    
    /* Paleta de colores compacta */
    .color-palette {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    .color-item {
        width: 100%;
        height: 45px;
        position: relative;
    }
    
    .color-picker {
        width: 100%;
        height: 40px;
        border-radius: 4px;
        border: 1px solid #ccc;
    }
    
    .color-remove {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
        top: 1px;
        right: 1px;
    }
    
    /* Botones de acción */
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 12px;
        width: 100%;
    }
    
    .action-buttons button {
        width: 100%;
        padding: 10px;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    
    /* Upload areas compactas */
    .logo-upload-area,
    .prize-upload-area {
        padding: 10px;
        border-radius: 6px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .upload-preview {
        max-width: 60px;
        max-height: 60px;
    }
    
    .upload-buttons {
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }
    
    .upload-buttons button {
        width: 100%;
        padding: 8px 10px;
        font-size: 0.8rem;
        border-radius: 5px;
    }
    
    /* Configuración de eliminación */
    .elimination-settings {
        padding: 10px;
        border-radius: 6px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Controles de rango más accesibles */
    .range-control {
        margin: 12px 0;
        width: 100%;
    }
    
    .range-control input[type="range"] {
        width: 100%;
        height: 6px;
        margin: 8px 0;
    }
    
    .range-display {
        text-align: center;
        font-weight: 600;
        font-size: 0.9rem;
        color: var(--primary-color);
        margin-top: 4px;
    }
}

/* Extra small devices (hasta 320px) */
@media (max-width: 320px) {
    .control-panel {
        padding: 8px;
    }
    
    .participants-section,
    .customize-section,
    .settings-section {
        padding: 12px;
    }
    
    .participants-section h3,
    .customize-section h3,
    .settings-section h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .setting-group {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .theme-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .theme-btn {
        padding: 8px;
        font-size: 0.75rem;
    }
    
    /* Chips de colores responsivos para pantallas muy pequeñas */
    .color-palette {
        gap: 6px;
        padding: 15px;
        max-height: 200px;
    }
    
    .color-item {
        min-width: 70px;
        padding: 4px 8px 4px 4px;
        border-radius: 20px;
    }
    
    .color-picker {
        width: 28px;
        height: 28px;
        margin-right: 6px;
    }
    
    .color-label {
        font-size: 0.65rem;
        max-width: 45px;
    }
    
    .color-remove {
        width: 20px;
        height: 20px;
        top: -6px;
        right: -6px;
        font-size: 0.6rem;
    }
    
    .palette-controls {
        gap: 8px;
        margin-top: 15px;
    }
    
    .btn-add-color,
    .btn-reset {
        padding: 10px 16px;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .tab-button {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}

/* Estilos responsivos para tablets */
@media (max-width: 768px) and (min-width: 481px) {
    .color-palette {
        gap: 6px;
        padding: 18px;
    }
    
    .color-item {
        min-width: 75px;
    }
    
    .color-picker {
        width: 30px;
        height: 30px;
    }
    
    .color-label {
        font-size: 0.7rem;
        max-width: 50px;
    }
    
    .btn-add-color,
    .btn-reset {
        padding: 10px 20px;
        min-width: 110px;
    }
}

/* Estilos para móviles */
@media (max-width: 480px) {
    .color-palette {
        gap: 6px;
        padding: 16px;
        max-height: 240px;
    }
    
    .color-item {
        min-width: 72px;
        padding: 5px 10px 5px 5px;
    }
    
    .color-picker {
        width: 30px;
        height: 30px;
    }
    
    .color-label {
        font-size: 0.7rem;
        max-width: 48px;
    }
    
    .color-remove {
        width: 22px;
        height: 22px;
        top: -7px;
        right: -7px;
    }
    
    .palette-controls {
        gap: 10px;
        flex-direction: column;
        align-items: center;
    }
    
    .btn-add-color,
    .btn-reset {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
}
