/* Main content layout */
.tech-stack-content-wrapper {
  display: flex;
  gap: 25px;
  flex: 1;
  position: relative;
  z-index: 2;
  padding: 0 15px;
  max-width: 1400px;
  margin: 0 auto;
  margin-top: 60px;
  align-items: flex-start;
  min-height: 0; /* Allow flex items to shrink */
}

/* Tech Stack Column */
.tech-stack-column {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tech-stack-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  padding: 24px; /* increase padding */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06), 0 5px 12px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  max-height: 70vh;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: brgba(48, 35, 35, 0.1);
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: 530px; /* Ensure card has a minimum height */
}

.tech-stack-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
  border-radius: 16px 16px 0 0;
}

.tech-stack-card-title {
  font-size: 1.4em; /* enlarged font size */
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

/* Tech Layers */
.tech-stack-layers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  gap: 12px;
}

.tech-layer {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
  position: relative;
  height: 130px;
}

.tech-layer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.tech-layer-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12), 0 2px 5px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  font-size: 0.85em;
}

.tech-layer-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 8px;
}

.frontend-icon {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 50%, #fca5a5 100%);
}
.ui-icon {
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #c4b5fd 100%);
}
.techstack-chart-icon {
  background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
}
.api-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
}
.integration-icon {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #a5b4fc 100%);
}
.test-icon {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #fdba74 100%);
}

.tech-layer-title {
  font-weight: 700;
  color: #1e293b;
  font-size: 1.1em; /* enlarged font size */
  letter-spacing: -0.01em;
}

.tech-layer-content {
  margin-top: 20px;
  margin-left: 12px;
}

.tech-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 0;
}

.tech-name {
  font-weight: 600;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.1em; /* enlarged font size */
  letter-spacing: -0.01em;
  height: 1.2em;
}

.tech-description {
  color: #64748b;
  font-size: 0.95em; /* enlarged font size */
  line-height: 1.3;
}

/* Analysis Column */
.analysis-column {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.analysis-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  padding: 24px; /* increase padding */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06), 0 5px 12px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  max-height: 70vh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "title"
    "table"
    "chosen";
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.analysis-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
  border-radius: 16px 16px 0 0;
}

.analysis-card-title {
  font-size: 1.4em; /* enlarged font size */
  font-weight: 700;
  background: linear-gradient(135deg, #10b981, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
  grid-area: title;
}

/* Decision banner - Modern state-of-the-art design */
.analysis-chosen {
  grid-area: chosen;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 24px;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.05) 0%,
    rgba(52, 211, 153, 0.03) 50%,
    rgba(110, 231, 183, 0.05) 100%
  );
  border-radius: 20px;
  border: 2px solid rgba(16, 185, 129, 0.1);
  position: relative;
}

.analysis-chosen-solution-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  background: linear-gradient(135deg, #047857, #059669);
  color: white;
  padding: 8px 16px;
  border-radius: 0 20px 0 16px;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.3);
  z-index: 10;
}

.analysis-chosen-framework-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  width: 100%;
}

.analysis-chosen-framework {
  background: linear-gradient(135deg, #10b981, #34d399, #6ee7b7);
  color: #fff;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 1.3em;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4),
    0 4px 12px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.analysis-chosen-framework::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.1),
    transparent,
    rgba(255, 255, 255, 0.1)
  );
  border-radius: 50px;
}

.analysis-chosen-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.analysis-chosen-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.1),
    rgba(52, 211, 153, 0.05)
  );
  color: #047857;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.85em;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.analysis-chosen-badge-icon {
  font-size: 1em;
}

.analysis-chosen-label {
  display: none; /* Hidden as we now use the header structure */
}

/* Analysis Table */
.analysis-table-container {
  overflow-x: auto;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  max-height: 35vh;
  overflow-y: auto;
  flex: 1;
  min-width: 300px;
  max-height: 45vh;
  overflow: auto;
  grid-area: table;
}

.analysis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em; /* enlarged font size */
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.analysis-table th,
.analysis-table td {
  padding: 6px 8px;
  text-align: center;
  border: 1px solid rgba(226, 232, 240, 0.4);
}

.analysis-table th {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  font-weight: 700;
  color: #334155;
  font-size: 0.8em; /* enlarged font size */
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid #cbd5e1;
}

.analysis-table th:first-child,
.analysis-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: #1e293b;
}

.winner-column {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.15),
    rgba(16, 185, 129, 0.08)
  ) !important;
  color: #047857 !important;
  font-weight: 700 !important;
}

.winner-cell {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.2),
    rgba(16, 185, 129, 0.1)
  );
  color: #047857;
  font-weight: 700;
  position: relative;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.winner-cell::before {
  content: "✓";
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.7em;
  color: #059669;
  font-weight: bold;
}

.total-row {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 3px solid #cbd5e1;
  font-weight: 600;
}

.average-row {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  font-weight: 600;
}

.winner-total,
.winner-average {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.25),
    rgba(16, 185, 129, 0.15)
  );
  color: #047857;
  font-weight: 800;
  border: 2px solid rgba(16, 185, 129, 0.4) !important;
  position: relative;
}

.winner-total::after,
.winner-average::after {
  content: "🏆";
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  font-size: 0.8em;
}

/* Analysis Result */
.analysis-result {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  padding: 15px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  max-height: 25vh;
  overflow-y: auto;
  flex: 1;
  min-width: 300px;
  max-height: 45vh;
  overflow: auto;
  grid-area: result;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #059669, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1em;
  letter-spacing: -0.01em;
}

.result-header::before {
  content: "📊";
  font-size: 0.9em;
  margin-right: 2px;
}

.result-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.4);
}

.winner-bar {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.1),
    rgba(16, 185, 129, 0.05)
  );
  border: 2px solid rgba(16, 185, 129, 0.3);
  position: relative;
  padding-left: 25px;
}

.winner-bar::before {
  content: "🏆";
  position: absolute;
  top: 50%;
  left: 6px;
  transform: translateY(-50%);
  font-size: 0.9em;
  z-index: 1;
}

.bar-label {
  width: 70px;
  font-size: 0.8em;
  font-weight: 600;
  color: #334155;
  letter-spacing: -0.01em;
}

.bar-container {
  flex: 1;
  height: 18px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 9px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.6);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bar-fill {
  height: 100%;
  border-radius: 9px;
  width: 0 !important;
  position: relative;
  overflow: hidden;
}

.bar-fill::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.1),
    transparent,
    rgba(255, 255, 255, 0.1)
  );
}

.clarity-bar {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 50%, #fca5a5 100%);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.material-bar {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}
.primeng-bar {
  background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.bar-value {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7em;
  font-weight: 700;
  color: #334155;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.architecture-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.flow-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.9em;
  font-weight: 600;
  color: #334155;
}

.flow-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3),
    0 4px 8px rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.flow-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 12px;
}

.flow-arrow {
  font-size: 1.8em;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}
