* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

header {
    color: white;
    margin-bottom: 20px;
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.btn-logout {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-button {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.tab-button.active {
    background: white;
    color: #667eea;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.section-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
}

.sub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.sub-tab-button {
    padding: 10px 18px;
    background: transparent;
    color: #666;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.sub-tab-button:hover {
    color: #667eea;
}

.sub-tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.sub-tab-content {
    display: none;
}

.sub-tab-content.active {
    display: block;
}

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

.actions-header h3 {
    font-size: 1.2rem;
    color: #333;
}

.btn-create {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.actions-list {
    display: grid;
    gap: 15px;
}

.action-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.action-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.action-info {
    flex: 1;
}

.action-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.action-description {
    font-size: 0.9rem;
    color: #666;
}

.action-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.btn-action {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit {
    background: #ffc107;
    color: #333;
}

.btn-edit:hover {
    background: #ffb300;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.btn-emoji {
    padding: 8px 15px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.btn-emoji:hover {
    background: #e0e0e0;
    border-color: #667eea;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

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

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.95rem;
}

.select-container {

    position: relative;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}



.channel-dropdown.show {
    display: block;
}

.channel-option {
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.channel-option:last-child {
    border-bottom: none;
}

.channel-option:hover {
    background-color: #f5f5ff;
}

.channel-option.selected {
    background-color: #667eea;
    color: white;
}

.channel-option .guild-name {
    font-weight: 600;
    color: #667eea;
    font-size: 0.85rem;
}

.channel-option.selected .guild-name {
    color: rgba(255,255,255,0.9);
}

.channel-option .channel-name {
    font-size: 0.95rem;
    margin-top: 2px;
}

.no-results {
    padding: 12px;
    text-align: center;
    color: #666;
    font-style: italic;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-send,
.btn-save {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-send:hover:not(:disabled),
.btn-save:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-send:disabled,
.btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
}

.btn-send.loading .btn-text {
    display: none;
}

.btn-send.loading .btn-loading {
    display: inline;
}

.notification {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
    font-weight: 500;
}

.notification.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notification.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.stat-card.loading {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.server-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 20px;
}

.server-selector label {
    margin: 0;
    font-weight: 600;
    color: #333;
}

#serverSelect {
    flex: 1;
    cursor: pointer;
}

footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    opacity: 0.8;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-logout {
        width: 100%;
    }

    .tabs {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .server-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .action-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .action-controls {
        width: 100%;
        justify-content: flex-end;
    }
}#channelSearch {
    width: 100%;
    padding: 14px;
    padding-right: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: white;
    cursor: pointer;
}

#channelSearch:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#channelSearch::placeholder {
    color: #999;
}

.select-container::after {
    content: '▼';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #667eea;
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.select-container.open::after {
    transform: translateY(-50%) rotate(180deg);
}

.channel-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    display: none;
    z-index: 1000;
}

.channel-dropdown::-webkit-scrollbar {
    width: 12px;
}

.channel-dropdown::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 0 8px 8px 0;
}

.channel-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 6px;
    border: 2px solid #f5f5f5;
}

.channel-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.channel-dropdown {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f5f5f5;
}

.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown-header {
    width: 100%;
    padding: 14px;
    padding-right: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
}

.custom-dropdown-header:hover {
    border-color: #667eea;
}

.custom-dropdown-header:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dropdown-text {
    flex: 1;
    color: #333;
}

.dropdown-text:empty::before {
    content: 'Seleccionar...';
    color: #999;
}

.dropdown-arrow {
    color: #667eea;
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.custom-dropdown-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    display: none;
    z-index: 1001;
    max-height: 350px;
    overflow: hidden;
}

.custom-dropdown-list.show {
    display: flex;
    flex-direction: column;
}

.dropdown-search {
    width: 100%;
    padding: 12px;
    border: none;
    border-bottom: 2px solid #f0f0f0;
    font-size: 0.95rem;
    font-family: inherit;
}

.dropdown-search:focus {
    outline: none;
    border-bottom-color: #667eea;
}

.dropdown-options {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
}

.dropdown-options::-webkit-scrollbar {
    width: 12px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 0 8px 8px 0;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 6px;
    border: 2px solid #f5f5f5;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.dropdown-option {
    padding: 12px 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background-color: #f5f5ff;
}

.dropdown-option.selected {
    background-color: #667eea;
    color: white;
}

.dropdown-option.selected:hover {
    background-color: #5568d3;
}
.channel-option {
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.channel-info {
    flex: 1;
    min-width: 0;
}

.channel-option .guild-name {
    font-weight: 600;
    color: #667eea;
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.channel-option .channel-name {
    font-size: 0.95rem;
    color: #333;
}

.channel-option.selected .guild-name {
    color: rgba(255,255,255,0.9);
}

.channel-option.selected .channel-name {
    color: white;
}
.modal-custom-dropdown {
    position: relative;
    width: 100%;
}

.modal-dropdown-header {
    width: 100%;
    padding: 14px;
    padding-right: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
}

.modal-dropdown-header:hover {
    border-color: #667eea;
}

.modal-dropdown-header:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-dropdown-text {
    flex: 1;
    color: #333;
}

.modal-dropdown-text:empty::before {
    content: 'Seleccionar...';
    color: #999;
}

.modal-dropdown-arrow {
    color: #667eea;
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.modal-dropdown-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    display: none;
    z-index: 1001;
    max-height: 350px;
    overflow: hidden;
    flex-direction: column;
}

.modal-dropdown-list.show {
    display: flex;
}

.modal-dropdown-search {
    width: 100%;
    padding: 12px;
    border: none;
    border-bottom: 2px solid #f0f0f0;
    font-size: 0.95rem;
    font-family: inherit;
}

.modal-dropdown-search:focus {
    outline: none;
    border-bottom-color: #667eea;
}

.modal-dropdown-search::placeholder {
    color: #999;
}

.modal-dropdown-options {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
}

.modal-dropdown-options::-webkit-scrollbar {
    width: 12px;
}

.modal-dropdown-options::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 0 8px 8px 0;
}

.modal-dropdown-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 6px;
    border: 2px solid #f5f5f5;
}

.modal-dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.modal-dropdown-options {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f5f5f5;
}

.modal-dropdown-options .dropdown-option {
    padding: 12px 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-dropdown-options .dropdown-option:last-child {
    border-bottom: none;
}

.modal-dropdown-options .dropdown-option:hover {
    background-color: #f5f5ff;
}

.modal-dropdown-options .dropdown-option.selected {
    background-color: #667eea;
    color: white;
}

.modal-dropdown-options .dropdown-option.selected:hover {
    background-color: #5568d3;
}

.modal-dropdown-options .dropdown-option .guild-name {
    font-weight: 600;
    color: #667eea;
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.modal-dropdown-options .dropdown-option .channel-name {
    font-size: 0.95rem;
    color: #333;
}

.modal-dropdown-options .dropdown-option.selected .guild-name {
    color: rgba(255,255,255,0.9);
}

.modal-dropdown-options .dropdown-option.selected .channel-name {
    color: white;
}

.modal-dropdown-options .channel-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.modal-dropdown-options .channel-info {
    flex: 1;
    min-width: 0;
}