/* BL PRO - Control Panel */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

body {
    font-family: 'Inter', sans-serif;
    background: #F5F7FA;
    background-image: 
        radial-gradient(at 20% 30%, rgba(30, 64, 175, 0.08) 0px, transparent 50%),
        radial-gradient(at 80% 70%, rgba(229, 9, 20, 0.08) 0px, transparent 50%);
    min-height: 100vh;
    padding: 20px;
    color: #1A2332;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #FFFFFF;
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.header {
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(229, 9, 20, 0.3);
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: #E50914;
    box-shadow: 0 0 12px rgba(229, 9, 20, 0.6);
}

.header h1 {
    font-family: 'Montserrat', sans-serif;
    color: #1E40AF;
    font-size: 2.2em;
    font-weight: 900;
    text-shadow: 0 0 25px rgba(30, 64, 175, 0.5);
    letter-spacing: 2px;
    margin: 0;
}

header .logo-header {
    height: 35px;
    width: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 15px rgba(30, 64, 175, 0.3));
}

.match-selector {
    margin-bottom: 12px;
    padding: 8px;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1), rgba(229, 9, 20, 0.1));
    border-radius: 6px;
    border: 2px solid rgba(30, 64, 175, 0.3);
    box-shadow: 0 3px 12px rgba(30, 64, 175, 0.15);
}

.match-selector-content {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.match-selector input {
    flex: 1;
    padding: 10px 15px;
    background: #FFFFFF;
    border: 2px solid rgba(30, 64, 175, 0.4);
    border-radius: 6px;
    font-size: 14px;
    color: #1A2332;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.match-selector input::placeholder {
    color: rgba(26, 35, 50, 0.4);
}

.match-selector input:focus {
    outline: none;
    border-color: #1E40AF;
    box-shadow: 0 0 15px rgba(30, 64, 175, 0.3);
    background: #FFFFFF;
}

.match-selector button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #E50914, #B30000);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(229, 9, 20, 0.3);
}

.match-selector button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.5);
    background: linear-gradient(135deg, #FF0A16, #C70000);
}

.match-selector button:active {
    transform: translateY(0);
}

.match-input {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.match-input label {
    color: #1A2332;
    font-weight: 600;
    font-size: 1.1em;
}

.match-input input {
    flex: 1;
    min-width: 200px;
    padding: 12px 18px;
    background: #FFFFFF;
    border: 1px solid rgba(30, 64, 175, 0.3);
    border-radius: 8px;
    font-size: 16px;
    color: #1A2332;
    font-family: 'Inter', sans-serif;
}

.match-input input:focus {
    outline: none;
    border-color: #1E40AF;
    box-shadow: 0 0 15px rgba(30, 64, 175, 0.3);
}

.btn-load {
    padding: 12px 30px;
    background: linear-gradient(135deg, #E50914, #B30000);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-load:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(229, 9, 20, 0.5);
}

.match-info {
    background: rgba(30, 64, 175, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid rgba(30, 64, 175, 0.2);
}

.match-info h2 {
    color: #1E40AF;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(30, 64, 175, 0.3);
}

#matchScore {
    font-size: 1.5em;
    font-weight: 700;
    color: #E50914;
    font-family: 'Montserrat', sans-serif;
}

/* === TEMAS Y PLANTILLAS === */
.themes-section {
    margin-bottom: 25px;
}

.themes-section h2 {
    font-family: 'Montserrat', sans-serif;
    color: #1E40AF;
    font-size: 1.6em;
    font-weight: 800;
    margin-bottom: 8px;
}

.themes-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.theme-selector-card,
.theme-editor-card {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05), rgba(229, 9, 20, 0.05));
    padding: 12px;
    border-radius: 8px;
    border: 2px solid rgba(30, 64, 175, 0.2);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.theme-selector-card h3,
.theme-editor-card h3 {
    font-family: 'Montserrat', sans-serif;
    color: #1A2332;
    font-size: 0.95em;
    font-weight: 700;
    margin-bottom: 10px;
}

.template-select {
    width: 100%;
    padding: 8px 12px;
    background: #FFFFFF;
    border: 2px solid rgba(30, 64, 175, 0.3);
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #1A2332;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.template-select:hover {
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.template-select:focus {
    outline: none;
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}

.theme-preview {
    background: #FFFFFF;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.preview-label {
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.color-box {
    text-align: center;
}

.color-box span {
    display: block;
    font-size: 11px;
    color: #6B7280;
    margin-bottom: 6px;
    font-weight: 600;
}

.color-sample {
    width: 100%;
    height: 50px;
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.btn-apply-theme,
.btn-apply-custom,
.btn-save-custom {
    width: 100%;
    padding: 8px 16px;
    background: linear-gradient( 135deg, #1E40AF, #2563EB);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(30, 64, 175, 0.3);
}

.btn-apply-theme:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

.theme-editor-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}

.editor-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.editor-group label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    padding: 6px 10px;
    border-radius: 6px;
    border: 2px solid rgba(30, 64, 175, 0.2);
}

.color-input-group input[type="color"] {
    width: 40px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.color-input-group span {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #374151;
    font-weight: 600;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid rgba(30, 64, 175, 0.2);
}

.slider-group input[type="range"] {
    flex: 1;
    height: 6px;
    background: linear-gradient(to right, #1E40AF, #E50914);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #1E40AF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.5);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #1E40AF;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.5);
}

.slider-group span {
    min-width: 50px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #1E40AF;
}

.btn-apply-custom {
    background: linear-gradient(135deg, #E50914, #FF2A2A);
    margin-bottom: 10px;
}

.btn-apply-custom:hover {
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

.btn-save-custom {
    background: linear-gradient(135deg, #059669, #10B981);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-save-custom:hover {
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

/* === OVERLAYS === */
.overlays-section {
    margin-top: 30px;
}

.overlays-section h2 {
    color: #1A2332;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 700;
}

.overlay-card {
    background: rgba(245, 247, 250, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(30, 64, 175, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.overlay-card:hover {
    border-color: #1E40AF;
    box-shadow: 0 5px 20px rgba(30, 64, 175, 0.15);
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.overlay-header h3 {
    color: #1A2332;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2em;
    font-weight: 700;
}

.btn-show {
    padding: 8px 20px;
    background: linear-gradient(135deg, #E50914, #FF2A2A);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3);
}

.btn-show:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.6);
}

.overlay-description {
    color: #5A6C7D;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.overlay-link {
    display: flex;
    gap: 10px;
}

.overlay-link input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(30, 64, 175, 0.05);
    border: 1px solid rgba(30, 64, 175, 0.2);
    border-radius: 6px;
    font-size: 14px;
    color: #1E40AF;
    font-family: 'Courier New', monospace;
}

.btn-copy,
.btn-open {
    padding: 10px 18px;
    background: rgba(30, 64, 175, 0.1);
    color: #1E40AF;
    border: 1px solid rgba(30, 64, 175, 0.3);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover,
.btn-open:hover {
    background: rgba(30, 64, 175, 0.2);
    border-color: #1E40AF;
    box-shadow: 0 0 15px rgba(30, 64, 175, 0.3);
}

/* vMix Section */
.vmix-section {
    margin-top: 30px;
    margin-bottom: 30px;
}

.vmix-section h2 {
    color: #1A2332;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 700;
}

.vmix-card {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.08), rgba(30, 64, 175, 0.08));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(229, 9, 20, 0.3);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 25px rgba(229, 9, 20, 0.1);
}

.vmix-description {
    color: #1A2332;
    margin-bottom: 15px;
    line-height: 1.6;
}

.vmix-description strong {
    color: #E50914;
    font-size: 1.1em;
}

.control-info {
    color: #5A6C7D;
    margin-bottom: 20px;
    font-size: 1em;
    text-align: center;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn-hide {
    padding: 8px 20px;
    background: rgba(26, 35, 50, 0.1);
    color: #5A6C7D;
    border: 1px solid rgba(26, 35, 50, 0.2);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-hide:hover {
    background: rgba(26, 35, 50, 0.2);
    border-color: #1A2332;
    transform: scale(1.05);
}

/* Match Stats */
.match-stats-container {
    margin-top: 30px;
}

.stats-summary {
    background: rgba(245, 247, 250, 0.5);
    border: 1px solid rgba(30, 64, 175, 0.2);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.match-header {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(229, 9, 20, 0.3);
}

.team-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.team-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 64, 175, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(30, 64, 175, 0.3);
    font-size: 40px;
}

.team-logo img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.team-summary .team-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #1A2332;
    text-transform: uppercase;
}

.team-summary .team-score {
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
    font-weight: 900;
    color: #1E40AF;
    text-shadow: 0 0 20px rgba(30, 64, 175, 0.5);
}

.team-summary .team-score.winner {
    color: #E50914;
    text-shadow: 0 0 20px rgba(229, 9, 20, 0.6);
}

.vs {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #5A6C7D;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
}

.stat-block {
    background: rgba(245, 247, 250, 0.5);
    border: 1px solid rgba(30, 64, 175, 0.2);
    border-radius: 8px;
    padding: 20px;
}

.stat-block h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #E50914;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-table,
.periods-table,
.players-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.stats-table th,
.periods-table th,
.players-table th {
    background: rgba(30, 64, 175, 0.1);
    color: #1E40AF;
    font-weight: 700;
    padding: 10px;
    text-align: center;
    border-bottom: 2px solid rgba(30, 64, 175, 0.3);
}

.stats-table td,
.periods-table td,
.players-table td {
    padding: 10px;
    text-align: center;
    color: #1A2332;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-table tr:hover,
.periods-table tr:hover,
.players-table tr:hover {
    background: rgba(30, 64, 175, 0.05);
}

.total.winner {
    color: #E50914;
    font-weight: 800;
    font-size: 16px;
}

.highlight {
    color: #E50914;
    font-weight: 700;
}

.players-table td strong {
    color: #1E40AF;
}

/* Overlays Compactos */
.overlays-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.overlay-card-compact {
    background: rgba(245, 247, 250, 0.8);
    border: 1px solid rgba(30, 64, 175, 0.3);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

.overlay-card-compact:hover {
    border-color: rgba(30, 64, 175, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 64, 175, 0.2);
}

.overlay-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.overlay-status h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #1A2332;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    font-size: 12px;
    line-height: 1;
    box-shadow: 0 0 10px currentColor;
    animation: pulse 2s ease-in-out infinite;
}

.badge-inactive {
    color: #5A6C7D;
    opacity: 0.4;
    animation: none;
}

.badge-active {
    color: #E50914;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.btn-group-compact {
    display: flex;
    gap: 8px;
}

.btn-show-compact,
.btn-hide-compact {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-show-compact {
    background: linear-gradient(135deg, #E50914, #FF2A2A);
    color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(229, 9, 20, 0.3);
}

.btn-show-compact:hover {
    background: linear-gradient(135deg, #FF2A2A, #E50914);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.5);
    transform: translateY(-2px);
}

.btn-hide-compact {
    background: rgba(26, 35, 50, 0.1);
    color: #5A6C7D;
    border: 1px solid rgba(26, 35, 50, 0.2);
}

.btn-hide-compact:hover {
    background: rgba(26, 35, 50, 0.2);
    border-color: #1A2332;
    transform: translateY(-2px);
}

/* Vista Previa del Monitor */
.monitor-preview-section {
    margin-top: 30px;
    background: rgba(245, 247, 250, 0.5);
    border: 2px solid rgba(30, 64, 175, 0.3);
    border-radius: 10px;
    padding: 20px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(229, 9, 20, 0.3);
}

.preview-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #1E40AF;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-toggle-preview {
    padding: 8px 16px;
    background: rgba(26, 35, 50, 0.1);
    color: #5A6C7D;
    border: 1px solid rgba(26, 35, 50, 0.2);
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-toggle-preview:hover {
    background: rgba(26, 35, 50, 0.2);
    border-color: #1A2332;
}

.preview-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #000000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

#monitor-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.preview-info {
    margin-top: 10px;
    padding: 10px;
    background: rgba(30, 64, 175, 0.1);
    border-left: 3px solid #1E40AF;
    border-radius: 4px;
}

.preview-info p {
    margin: 0;
    color: #5A6C7D;
    font-size: 13px;
    line-height: 1.5;
}

/* ===== Secciones Colapsables ===== */
.collapsible-section {
    margin-bottom: 8px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(30, 64, 175, 0.3);
}

.section-header:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

.section-header:active {
    transform: translateY(0);
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.collapse-icon {
    font-size: 0.85em;
    transition: transform 0.3s ease;
}

.section-header.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.section-content {
    max-height: 5000px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 1;
    padding-top: 10px;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
}

/* ===== Controles de Posición y Zoom ===== */
.overlay-position-card {
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
    border: 2px solid rgba(30, 64, 175, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.overlay-position-card h3 {
    font-family: 'Montserrat', sans-serif;
    color: #1E40AF;
    font-size: 1.1em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.position-info {
    color: #5A6C7D;
    font-size: 0.85em;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(30, 64, 175, 0.1);
}

.overlay-position-group {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(30, 64, 175, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.overlay-position-group:hover {
    border-color: rgba(30, 64, 175, 0.3);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.1);
}

.overlay-position-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95em;
    font-weight: 700;
    color: #1A2332;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid rgba(229, 9, 20, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.position-controls {
    display: grid;
   grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-item label {
    font-size: 0.75em;
    font-weight: 600;
    color: #5A6C7D;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #F8FAFC;
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid rgba(30, 64, 175, 0.1);
}

.slider-group input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #1E40AF 0%, #60A5FA 100%);
    outline: none;
    -webkit-appearance: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1E40AF;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.4);
    transition: all 0.2s ease;
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #2563EB;
    transform: scale(1.1);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1E40AF;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.4);
    transition: all 0.2s ease;
}

.slider-group input[type="range"]::-moz-range-thumb:hover {
    background: #2563EB;
    transform: scale(1.1);
}

.slider-group span {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: #1E40AF;
    font-size: 0.9em;
}

.btn-reset-position {
    grid-column: span 3;
    padding: 6px 12px;
    background: linear-gradient(135deg, #E50914 0%, #B91C1C 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
}

.btn-reset-position:hover {
    background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

.btn-reset-position:active {
    transform: translateY(0);
}

.btn-reset-all-positions {
    width: 100%;
    padding: 8px 20px;
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    box-shadow: 0 3px 12px rgba(30, 64, 175, 0.3);
}

.btn-reset-all-positions:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

.btn-reset-all-positions:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .position-controls {
        grid-template-columns: 1fr;
    }
    
    .btn-reset-position {
        grid-column: span 1;
    }
    
    .section-title {
        font-size: 1.1em;
    }
}
