@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Ubuntu:wght@400;500;700&display=swap');




    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      background-color: #f0f2f5; 
    }

    .main-tasks-container {
        padding: 10px 25px 0;
        background-color: #f8f9fa;
        border-bottom: 2px solid #f08c00;
        flex-shrink: 0;
        display: flex;
        justify-content: center;
        gap: 5px;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    .main-task-btn {
        padding: 12px 25px;
        border: 1px solid #ccc;
        border-bottom: none;
        border-radius: 8px 8px 0 0;
        font-size: 1em;
        font-weight: 500;
        color: #555;
        background-color: #e9ecef;
        cursor: pointer;
        transition: background-color 0.2s, color 0.2s;
    }
    .main-task-btn:hover {
        background-color: #f1f3f5;
    }
    .main-task-btn.active {
        background-color: white;
        border-bottom: 1px solid white;
        position: relative;
        top: 1px;
        font-weight: 600;
        color: #007bff;
    }

    .page-container {
      flex-grow:1;
      position: relative;
      background-color: white;
    }
    .page-content {
        display: none;
        width: 100%;
        padding: 10px;
    }
    .page-content.active {
        display: grid; 
        grid-template-columns: 320px 1fr 350px;
        gap: 3px;
    }
    
    .column {
        border: none;
        border-radius: 15px;
        background: #f8f9fa;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
      
    }
    
    #simulation-column {
      display: flex; 
      flex-direction: column; 
      justify-content: flex-start;
      align-items: center;
      padding-top: 20px; 
      padding-bottom: 20px;
    }

    #analysis-plot-column {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    .chart-controls {
      flex-shrink: 0; 
      display: flex;
      gap: 30px;
      flex-wrap: wrap;
      justify-content: center;
      background: white;
      padding: 20px;
      border-radius: 10px;
      border: 1px solid #dee2e6;
    }
    .chart-container {
      width: 100%;
      height: 500px;
      background: white;
      border-radius: 8px;
      border: 1px solid #dee2e6;
      padding: 20px;
      position: relative;
    }
    #analysisChart {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }


    h3 {
      color: #333;
      margin: 0 0 20px 0;
      text-align: center;
      font-size: 1.3em;
      font-weight: 600;
    }

    .input-group {
      margin-bottom: 20px;
      padding: 15px;
      background: white;
      border-radius: 10px;
      border: 1px solid #dee2e6;
    }

    label {
      display: block;
      margin-bottom: 8px;
      font-weight: 600;
      color: #495057;
      font-size: 0.9em;
    }

    input, select {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid #ced4da;
      border-radius: 8px;
      font-size: 14px;
      transition: all 0.2s ease;
      background: white;
    }
    input:focus, select:focus {
      border-color: #80bdff;
      outline: 0;
      box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
    }

    .grid-container {
      border: 3px solid #333;
      border-radius: 12px;
      overflow: hidden; 
      box-shadow: 0 4px 20px rgba(0,0,0,0.3);
      background: #333; 

      cursor: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUgMkM0LjQ0NzcyIDIgNCAyLjQ0NzcyIDQgM1YyMUM0IDIxLjU1MjMgNC40NDc3MiAyMiA1IDIySDEzQzEzLjU1MjMgMjIgMTQgMjEuNTUyMyAxNCAyMVYzQzE0IDIuNDQ3NzIgMTMuNTUyMyAyIDEzIDJINVoiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSIjZmZmIi8+CjxwYXRoIGQ9Ik03IDE5SDExIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+Cjwvc3ZnPgo=') 12 12, auto;
      aspect-ratio: 1 / 1;
      margin: 0 auto;
      display: grid;
    }

    .cell {
      width: 20px; 
      height: 20px; 
      border: none; 
      transition: background-color 0.1s ease, transform 0.2s ease; 
      position: relative;
    }
    .cell:hover {
      transform: scale(1.15); 
      z-index: 10;
      box-shadow: 0 0 10px rgba(0,0,0,0.6); 
    }
    
    .transmitter {
      background-color: transparent;
      background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10' stroke='black' stroke-width='2' fill='white'/><circle cx='12' cy='12' r='4' fill='black'/></svg>");
      background-size: 20px 20px;
      background-repeat: no-repeat;
      background-position: center;
    }
    
    .obstacle-normal { background: linear-gradient(45deg, #555, #777) !important; border: 1px solid #222 !important; }
    .obstacle-heavy { background: linear-gradient(45deg, #7A0000, #C01030) !important; border: 1px solid #500 !important; box-shadow: inset 0 1px 3px rgba(0,0,0,0.4); }
    .outage-cell { box-shadow: inset 0 0 0 1px #dd0033, 0 0 4px rgba(255, 23, 68, 0.5); animation: blink-outage 1.5s infinite alternate; }
    .obstacle-normal.outage-cell, .obstacle-heavy.outage-cell { box-shadow: inset 0 0 0 1px #dd0033, 0 0 4px rgba(255, 23, 68, 0.5); }
    
    @keyframes blink-outage { 
      from { box-shadow: inset 0 0 0 1px #dd0033, 0 0 4px rgba(255, 23, 68, 0.5); }
      to   { box-shadow: inset 0 0 0 1px #ff4466, 0 0 7px rgba(255, 87, 34, 0.7); }
    }
    .cell.shadowed-cell::after {
        content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
        background-color: rgba(0, 0, 0, var(--shadow-alpha, 0.02)); 
        pointer-events: none; z-index: 1; transition: background-color 0.1s ease-in-out;
    }
    .transmitter.shadowed-cell::after, .obstacle-normal.shadowed-cell::after, .obstacle-heavy.shadowed-cell::after { display: none; }

    .tooltip {
      position: absolute; background: #212529; 
      color: white; padding: 10px 15px; border-radius: 8px; font-size: 12px; pointer-events: none;
      white-space: nowrap; transform: translate(-50%, -120%); z-index: 9999; /* Ensure it's above everything else */
      box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }
    .output-section {
      margin-bottom: 20px; padding: 15px; background: white; 
      border-radius: 10px; border-left: 4px solid #007bff;
    }
    .output-section h4 { margin: 0 0 12px 0; color: #343a40; font-size: 1.1em; font-weight: 600; }
    .metric { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; padding: 6px 0; border-bottom: 1px solid #e9ecef; }
    .metric:last-child { border-bottom: none; }
    .metric-label { font-weight: 500; color: #495057; font-size: 0.9em; }
    .metric-value { font-family: 'Courier New', monospace; font-weight: bold; color: #212529; font-size: 0.95em; }

    .status-indicator { padding: 12px; border-radius: 8px; text-align: center; font-weight: 600; margin-top: 10px; transition: all 0.3s ease; color: white; }
    .status-excellent { background-color: #28a745; }
    .status-good { background-color: #ffc107; color: #212529;}
    .status-fair { background-color: #fd7e14; }
    .status-poor { background-color: #dc3545; }

    .legend {
      margin-top: 5px; /* Reduced from 20px to 5px */
      padding: 15px; 
      background: white;
      border-radius: 10px; 
      border: 1px solid #dee2e6;
      width: 558px; 
      display: flex; 
      flex-wrap: wrap; 
      justify-content: center; 
      gap: 15px; 
      align-items: center; 
    }

    .legend h4 { margin: 0 0 12px 0; color: #343a40; font-size: 1em; font-weight: 600; flex-basis: 100%; text-align: center; }
    .legend-item { display: flex; align-items: center; margin: 0; font-size: 0.85em; color: #495057; }
    .legend-color { width: 20px; height: 20px; border-radius: 4px; margin-right: 10px; border: 1px solid #ced4da; flex-shrink: 0; }

    .instructions { font-size: 0.85em; color: #495057; margin-top: 15px; padding: 12px; background: white; border-radius: 8px; border-left: 4px solid #ffc107; line-height: 1.4; }
    .action-button { width: 100%; padding: 12px; background: #98CB3B; color: white; border: solid; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.95em; margin-top: 15px; transition: all 0.2s ease; }
    .action-button:hover { background:  #98CB3B; }
    .mode-buttons { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
    .mode-btn { padding: 8px 4px; margin: 0; font-size: 0.8em; border-radius: 6px; background: #6c757d; border:none; color:white; cursor:pointer; }
    .mode-btn.active { background: #28a745; transform: scale(1.05); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
    .progress-bar { width: 100%; height: 8px; background: #e9ecef; border-radius: 4px; overflow: hidden; margin: 5px 0; }
    .progress-fill { height: 100%; transition: width 0.3s ease; }
    #outageProgress.progress-fill { background: #dc3545; }
    
    .chart-control-group { display: flex; flex-direction: column; gap: 5px; }
    .chart-control-group label { font-size: 0.85em; font-weight: 600; color: #495057; }

.instructions-panel {
    grid-column: 1 / -1;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 5px solid #17a2b8;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom:  10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Hidden state styling */
.instructions-panel.hidden {
    max-height: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
}

.instructions-panel.hidden * {
    display: none;
}

.instructions-panel h3 {
    color: #17a2b8;
    font-size: 1.2em;
    margin-bottom: 12px;
    text-align: left;
}

.instructions-panel ol {
    padding-left: 25px;
    margin: 0 0 15px 0;
}

.instructions-panel li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #495057;
}

.instructions-panel strong {
    color: #212529;
}

.close-instructions-btn {
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 0.9em;
    cursor: pointer;
    float: right;
    transition: background-color 0.2s;
}

.close-instructions-btn:hover {
    background-color: #138496;
}

.instructions-panel.hidden {
    max-height: 50px;
    padding: 10px 20px;
    overflow: hidden;
}

.instructions-panel.hidden ol {
    display: none;
}

/* Show Instructions Button */
.show-instructions-btn {
    grid-column: 1 / -1;
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.show-instructions-btn:hover {
    background-color: #138496;
}

/* Styling for the collapsible instructions */
.v-collapsible-instruction-container {
  grid-column: 1 / -1;
  margin-top: 2%;
  margin-bottom: 15px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.v-collapsible {
  cursor: pointer;
  padding: 15px 20px;
  font-weight: 600;
  color: #17a2b8;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  border-radius: 8px 8px 0 0;
  position: relative;
}

.v-collapsible::after {
  content: '+';
  position: absolute;
  right: 20px;
  font-size: 1.2em;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.v-collapsible.active::after {
  content: '−';
}

.v-content {
  text-align: left;
  padding: 0 10%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.v-content.show {
  padding: 20px 10%;
  max-height: 1000px;
}

.v-content h3 {
  margin: 0;
  text-align: left;
  font-weight: normal;
}

.v-content ol {
  padding-left: 20px;
}

/* Instruction highlighting styles */
.v-content ol li {
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background-color: transparent;
  line-height: 1.5;
  color: #495057;
}

.v-content ol li.instruction-active {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
  transform: translateX(5px);
}

.v-content ol li.instruction-completed {
  background-color: #d4edda;
  border-left: 4px solid #28a745;
  opacity: 0.7;
}

.v-content ol li.instruction-completed::after {
  content: ' ✓';
  color: #28a745;
  font-weight: bold;
  margin-left: 8px;
}

/* Remove the old instruction styling that's no longer needed */
.instructions-panel, .show-instructions-btn, .close-instructions-btn {
  display: none;
}
