* {
  box-sizing: border-box;
}

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

.main-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
  padding: 0;
}

h1 {
  color: #66fcf1;
  margin: 10px 0;
  text-align: center;
  text-shadow: 0 0 10px #45a29e;
  font-size: 2em;
  z-index: 10;
  position: relative;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.content-container {
  display: flex;
  flex-direction: row;
  flex: 1;
  width: 100%;
  gap: 15px;
  padding: 0 15px 80px 15px; /* Extra bottom padding for tabs */
  min-height: 0;
  overflow: hidden;
}

.fractal-container {
  flex: 1;
  display: flex;
  min-height: 0;
}

.description-container {
  flex: 1;
  display: flex;
  min-height: 0;
}

canvas {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1f2833 0%, #0b0c10 100%);
  border: 3px solid #45a29e;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(69, 162, 158, 0.4);
  min-height: 0;
}

.info-container {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1f2833 0%, #0b0c10 100%);
  border: 3px solid #45a29e;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(69, 162, 158, 0.3);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  min-height: 0;
}

.info-container h2 {
  color: #66fcf1;
  margin: 0 0 15px 0;
  border-bottom: 2px solid #45a29e;
  padding-bottom: 10px;
  font-size: 1.5em;
}

.info-container code {
  display: block;
  background: rgba(11, 12, 16, 0.8);
  color: #66fcf1;
  padding: 10px 15px;
  margin: 8px 0;
  border-radius: 8px;
  font-family: "Courier New", monospace;
  border-left: 4px solid #45a29e;
  font-size: 0.9em;
  line-height: 1.4;
}

.tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  background: linear-gradient(135deg, #1f2833 0%, #0b0c10 100%);
  border-top: 3px solid #45a29e;
  padding: 10px 15px;
  scrollbar-width: none;
  z-index: 1000;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
  align-items: center;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  background: linear-gradient(135deg, #0b0c10 0%, #1f2833 100%);
  color: #66fcf1;
  padding: 10px 18px;
  margin-right: 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  border: 2px solid #45a29e;
  font-weight: 600;
  font-size: 0.9em;
  min-width: 120px;
  text-align: center;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab:hover {
  background: linear-gradient(135deg, #45a29e 0%, #66fcf1 100%);
  color: #0b0c10;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 252, 241, 0.3);
}

.tab.active {
  background: linear-gradient(135deg, #66fcf1 0%, #45a29e 100%);
  color: #0b0c10;
  border-color: #66fcf1;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 252, 241, 0.4);
}

.info-container::-webkit-scrollbar {
  width: 8px;
}

.info-container::-webkit-scrollbar-track {
  background: #1f2833;
  border-radius: 4px;
}

.info-container::-webkit-scrollbar-thumb {
  background: #45a29e;
  border-radius: 4px;
}

.info-container::-webkit-scrollbar-thumb:hover {
  background: #66fcf1;
}

/* Mobile Layout */
@media (max-width: 768px) {
  h1 {
    font-size: 1.7em;
    height: 40px;
    margin: 5px 0;
  }

  .content-container {
    flex-direction: column;
    padding: 0 10px 80px 10px;
    gap: 10px;
  }

  .fractal-container {
    flex: 1;
    min-height: 200px;
  }

  .description-container {
    flex: 1;
    min-height: 200px;
  }

  .tabs {
    height: 60px;
    padding: 8px 10px;
  }

  .tab {
    padding: 8px 14px;
    min-width: 100px;
    font-size: 0.85em;
    margin-right: 8px;
    height: 36px;
  }

  .info-container {
    padding: 15px;
  }
  
  .info-container code {
    padding: 8px 12px;
    font-size: 0.85em;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5em;
    height: 35px;
  }
  
  .content-container {
    padding: 0 5px 80px 5px;
  }
  
  .tab {
    padding: 6px 12px;
    min-width: 90px;
    font-size: 0.8em;
    height: 34px;
  }
  
  .tabs {
    height: 60px;
  }
}
