/* Complexity Calculator Styles */
.complexity-hero {
  position: relative;
  overflow: hidden;
  padding: 120px 20px 80px;
  background: var(--bg);
  text-align: center;
}

.complexity-hero-background {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}

.complexity-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.title-line {
  display: block;
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.main-title {
  display: block;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.subtitle {
  display: block;
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-top: 10px;
  font-weight: 400;
}

.complexity-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Dashboard Layout */
.cc-dashboard {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

@media (max-width: 1024px) {
  .cc-dashboard {
    grid-template-columns: 1fr;
  }
}

/* Graph Canvas */
.cc-graph-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

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

.cc-graph-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cc-canvas-wrapper {
  position: relative;
  flex: 1;
  min-height: 500px;
  width: 100%;
}

/* Control Panel */
.cc-controls {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.cc-control-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cc-control-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Range Slider */
.cc-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cc-slider-header {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cc-val-badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
}

input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  margin-top: -6px;
  box-shadow: 0 0 10px var(--accent);
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* Toggles */
.cc-toggles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.cc-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  transition: background 0.2s, border-color 0.2s;
}

.cc-toggle-label:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.cc-toggle-label input {
  display: none;
}

.cc-toggle-box {
  width: 16px;
  height: 16px;
  border: 2px solid;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cc-toggle-label input:checked + .cc-toggle-box {
  background: currentColor;
}

.cc-toggle-box::after {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 10px;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s;
}

.cc-toggle-label input:checked + .cc-toggle-box::after {
  opacity: 1;
  transform: scale(1);
}

/* Colors for specific toggles */
.t-o1 { color: #4ade80; }       /* Green */
.t-ologn { color: #3b82f6; }    /* Blue */
.t-on { color: #facc15; }       /* Yellow */
.t-onlogn { color: #f97316; }   /* Orange */
.t-on2 { color: #ef4444; }      /* Red */
.t-o2n { color: #d946ef; }      /* Fuchsia */
.t-onfact { color: #9333ea; }   /* Purple */

/* Compare Algorithms */
.cc-compare {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cc-select {
  width: 100%;
  padding: 10px 15px;
  background: rgba(10, 10, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  appearance: none;
  cursor: pointer;
}

.cc-compare-vs {
  text-align: center;
  font-weight: bold;
  color: var(--accent);
  font-style: italic;
  font-size: 0.9rem;
}

.cc-stats-box {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  border-left: 3px solid var(--accent);
}

.cc-stats-box span {
  display: block;
  margin-bottom: 5px;
}
.cc-stats-box span:last-child {
  margin-bottom: 0;
}
.cc-stat-highlight {
  color: #fff;
  font-weight: bold;
  font-family: var(--font-mono);
}
