/* Modern UI Styles */

:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #10b981;
  --secondary-dark: #059669;
  --bg-color: #f9fafb;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --investor-color: #6366f1;
  --startup-color: #10b981;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 2000px;
  margin: 0 auto;
  padding: 20px;
}

/* Header styles */
.app-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  padding: 24px;
}

.header-content {
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}

.app-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 24px;
}

.header-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

/* Button styles */
.btn {
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-btn {
  background-color: var(--secondary-color);
  color: white;
  box-shadow: var(--shadow);
}

.primary-btn:hover {
  background-color: var(--secondary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.secondary-btn {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  backdrop-filter: blur(10px);
}

.secondary-btn:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Main layout */
main {
  display: flex;
  gap: 24px;
  flex-grow: 1;
}

.graph-container {
  flex: 1;
  position: relative;
  height: calc(100vh - 250px);
  min-height: 600px;
  border-radius: var(--border-radius);
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Loading overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-left-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

/* Sidebar styles */
.sidebar {
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-section {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 20px;
  transition: var(--transition);
}

.sidebar-section:hover {
  box-shadow: var(--shadow-md);
}

.sidebar-section h3 {
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.info-panel {
  background-color: var(--bg-color);
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  max-height: 300px;
  overflow-y: auto;
  line-height: 1.6;
}

/* Legend styles */
.legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.legend-line {
  width: 30px;
  height: 3px;
  background-color: #94a3b8;
  border-radius: 2px;
}

.startup {
  background-color: var(--startup-color);
}

.investor {
  background-color: var(--investor-color);
}

/* Filter controls */
.filter-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #eee;
  border-radius: 4px;
  transition: var(--transition);
}

.checkbox-container:hover input ~ .checkmark {
  background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Footer styles */
.app-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

/* Graph styling */
svg .node text {
  fill: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 12px;
}

svg .node circle {
  stroke: white;
  stroke-width: 2px;
  filter: drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.2));
  transition: all 0.2s ease;
}

svg .node:hover circle {
  stroke-width: 3px;
  filter: drop-shadow(0px 3px 5px rgba(0, 0, 0, 0.3));
}

/* Responsive design */
@media (max-width: 1024px) {
  main {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .sidebar-section {
    flex: 1;
    min-width: 300px;
  }
  
  .graph-container {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .header-controls {
    flex-direction: column;
    gap: 12px;
  }
  
  .sidebar {
    flex-direction: column;
  }
}
