/* Discord Poll Dashboard Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.header h1 {
    color: #5865F2;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.header p {
    color: #666;
    font-size: 1.1rem;
}

.nav-tabs {
    display: flex;
    background: white;
    border-radius: 15px;
    padding: 5px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab:hover {
    background: #f8f9fa;
}

.tab.active {
    background: #5865F2;
    color: white;
    box-shadow: 0 5px 15px rgba(88,101,242,0.3);
}

.content-panel {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-height: 500px;
}

/* Configuration Panel */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.config-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.config-group h3 {
    margin-bottom: 15px;
    color: #5865F2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.input-group input, .input-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-group input:focus, .input-group textarea:focus {
    outline: none;
    border-color: #5865F2;
    box-shadow: 0 0 0 3px rgba(88,101,242,0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #5865F2;
    color: white;
}

.btn-primary:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(88,101,242,0.3);
}

.btn-success {
    background: #57F287;
    color: white;
}

.btn-success:hover {
    background: #3BA55D;
}

.btn-danger {
    background: #ED4245;
    color: white;
}

.btn-danger:hover {
    background: #C73E41;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Status Indicators */
.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.status.connected {
    background: #d4edda;
    color: #155724;
}

.status.disconnected {
    background: #f8d7da;
    color: #721c24;
}

/* Poll Results */
.poll-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.poll-card:hover {
    border-color: #5865F2;
    box-shadow: 0 5px 20px rgba(88,101,242,0.1);
}

.poll-question {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-result {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.option-result.has-votes {
    border-color: #5865F2;
    background: linear-gradient(90deg, rgba(88,101,242,0.1) 0%, rgba(88,101,242,0.05) 100%);
}

.option-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 10px;
}

.option-text {
    font-weight: 600;
    color: #2c3e50;
}

.vote-count {
    background: #5865F2;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.voters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.voter-badge {
    background: #e3f2fd;
    color: #1565c0;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #bbdefb;
}

/* Group Assignment */
.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.group-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.group-card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.group-members {
    list-style: none;
}

.group-members li {
    background: rgba(255,255,255,0.2);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Algorithm Controls */
.algorithm-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.criteria-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 2px solid #e9ecef;
}

.criteria-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #5865F2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .groups-container {
        grid-template-columns: 1fr;
    }
    
    .dashboard {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
}

/* Loading and Animation */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #5865F2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-info { color: #17a2b8; }
.mb-3 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
