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

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

        .container {
            max-width: 1600px;
            margin: 0 auto;
            padding: 20px;
        }

        .header {
            text-align: center;
            color: white;
            margin-bottom: 30px;
        }

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

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

        .main-content {
            display: grid;
            grid-template-columns: 350px 1fr;
            gap: 30px;
            margin-bottom: 30px;
        }

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

        .panel-header .section-title {
            margin-bottom: 0;
        }

        .btn-fullscreen {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s;
        }

        .btn-fullscreen:hover {
            transform: translateY(-1px);
            box-shadow: 0 3px 10px rgba(0,0,0,0.2);
        }

        .visualization-panel.fullscreen {
            position: fixed;
            top: 20px;
            left: 20px;
            right: 20px;
            bottom: 20px;
            z-index: 1000;
            max-width: none;
            width: calc(100% - 40px);
            height: calc(100% - 40px);
            overflow-y: auto;
        }

        .visualization-panel.fullscreen .panel-header {
            position: sticky;
            top: 0;
            background: white;
            z-index: 1001;
            padding: 10px 0;
            border-bottom: 1px solid #e2e8f0;
        }

        /* Esconder o painel de controle quando expandido */
        .main-content.fullscreen-mode .control-panel {
            display: none;
        }

        .main-content.fullscreen-mode {
            grid-template-columns: 1fr;
        }

        .control-panel {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            backdrop-filter: blur(10px);
            height: fit-content;
            position: sticky;
            top: 20px;
        }

        .visualization-panel {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            backdrop-filter: blur(10px);
        }

        .section-title {
            font-size: 1.4rem;
            margin-bottom: 20px;
            color: #4a5568;
            border-bottom: 2px solid #667eea;
            padding-bottom: 10px;
        }

        .task-form {
            margin-bottom: 25px;
        }

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

        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
            color: #4a5568;
        }

        .form-group input, .form-group select {
            width: 100%;
            padding: 10px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            font-size: 16px;
            transition: border-color 0.3s;
        }

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

        .btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            transition: transform 0.2s, box-shadow 0.2s;
            margin-right: 10px;
            margin-bottom: 10px;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        }

        .btn-secondary {
            background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
        }

        .btn-danger {
            background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
        }

        .btn-compare {
            background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
            width: 100%;
            margin-top: 10px;
        }

        .task-list {
            margin-bottom: 20px;
        }

        .task-item {
            background: #f7fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .task-info {
            flex: 1;
        }

        .task-name {
            font-weight: bold;
            color: #2d3748;
        }

        .task-details {
            font-size: 0.9rem;
            color: #718096;
            margin-top: 5px;
        }

        .task-score {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: bold;
        }

        .algorithm-selector {
            margin-bottom: 20px;
        }

        .algorithm-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 10px;
            margin-top: 10px;
        }

        .algorithm-checkbox {
            display: flex;
            align-items: center;
            padding: 10px;
            background: #f7fafc;
            border-radius: 8px;
            border: 2px solid #e2e8f0;
            transition: all 0.3s;
            cursor: pointer;
        }

        .algorithm-checkbox:hover {
            border-color: #667eea;
            background: #edf2f7;
        }

        .algorithm-checkbox.selected {
            border-color: #667eea;
            background: #e6fffa;
        }

        .algorithm-checkbox input {
            margin-right: 8px;
        }

        .comparison-mode {
            background: #e6fffa;
            border: 2px solid #48bb78;
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 20px;
            text-align: center;
        }

        .comparison-results {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .algorithm-result {
            background: #f7fafc;
            border-radius: 10px;
            padding: 20px;
            border-left: 4px solid #667eea;
        }

        .algorithm-title {
            font-size: 1.2rem;
            font-weight: bold;
            margin-bottom: 15px;
            color: #2d3748;
        }

        .timeline {
            margin-bottom: 15px;
        }

        .timeline-container {
            position: relative;
            background: white;
            border-radius: 8px;
            padding: 15px;
            overflow-x: auto;
            /* Remover: height: 150px; */
        }

        .timeline-scale {
            display: flex;
            margin-bottom: 10px;
            font-size: 0.8rem;
            color: #718096;
        }

        .timeline-tick {
            flex: 1;
            text-align: center;
            border-right: 1px solid #e2e8f0;
            padding: 5px;
            min-width: 30px;
        }

        .timeline-container {
            position: relative;
            background: white;
            border-radius: 8px;
            padding: 15px;
            overflow-x: auto;
            height: 150px; /* Altura fixa para os 3 estados */
        }

        .timeline-bar {
            display: flex;
            margin-bottom: 8px;
            align-items: center;
            height: 35px;
        }

        .task-label {
            width: 60px;
            font-size: 0.7rem;
            font-weight: bold;
            margin-right: 10px;
        }

        .task-execution {
            height: 20px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.7rem;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
            transition: all 0.3s;
            position: relative;
            overflow: hidden;
        }

        .task-execution:hover {
            transform: scale(1.05);
            box-shadow: 0 3px 10px rgba(0,0,0,0.3);
        }

        .task-a { background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); } /* Verde para execução */
        .task-b { background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%); } /* Azul para espera */
        .task-c { background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%); } /* Laranja para sobrecarga */

        .algorithm-stats {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-top: 15px;
        }

        .stat-item {
            background: white;
            padding: 10px;
            border-radius: 6px;
            text-align: center;
        }

        .stat-value {
            font-size: 1.2rem;
            font-weight: bold;
            color: #667eea;
        }

        .stat-label {
            font-size: 0.8rem;
            color: #718096;
        }

        .comparison-table {
            background: white;
            border-radius: 15px;
            padding: 25px;
            margin-top: 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            overflow-x: auto;
        }

        .comparison-table table {
            width: 100%;
            border-collapse: collapse;
        }

        .comparison-table th,
        .comparison-table td {
            padding: 12px;
            text-align: center;
            border-bottom: 1px solid #e2e8f0;
        }

        .comparison-table th {
            background: #f7fafc;
            font-weight: bold;
            color: #4a5568;
        }

        .best-result {
            background: #c6f6d5 !important;
            font-weight: bold;
        }

        @media (max-width: 1200px) {
            .main-content {
                grid-template-columns: 1fr;
            }
            
            .control-panel {
                position: relative;
            }
        }

        @media (max-width: 768px) {
            .comparison-results {
                grid-template-columns: 1fr;
            }
            
            .header h1 {
                font-size: 2rem;
            }
            
            .algorithm-grid {
                grid-template-columns: 1fr;
            }
        }

        .single-result {
            background: white;
            border-radius: 15px;
            padding: 25px;
            margin-top: 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }

        .execution-log {
            max-height: 200px;
            overflow-y: auto;
            background: #f7fafc;
            padding: 10px;
            border-radius: 6px;
            margin-top: 10px;
            font-size: 0.8rem;
        }