body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: #2c3e50;
  border: none;
  border-radius: 4px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background-color: white;
  margin: 3px 0;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.sidebar {
  width: 250px;
  background-color: #2c3e50;
  color: white;
  padding: 20px 0;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid #34495e;
  margin-bottom: 20px;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #ecf0f1;
}

.sidebar-nav {
  padding: 0 20px;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  margin-bottom: 8px;
  text-decoration: none;
  color: #bdc3c7;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-link:hover {
  background-color: #34495e;
  color: #ecf0f1;
}

.nav-link.active {
  background-color: #3498db;
  color: white;
}

.nav-icon {
  margin-right: 10px;
  font-size: 1.2rem;
}

.main-wrapper {
  flex: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
}

.tool-content {
  display: none;
  flex: 1;
}

.tool-content.active {
  display: block;
}

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

.app-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
  border-bottom: 2px solid #007bff;
}

.app-header h1 {
  margin: 0 0 10px 0;
  color: #007bff;
  font-size: 2.5rem;
}

.app-header p {
  margin: 0;
  color: #666;
  font-size: 1.1rem;
}

.main-content {
  flex: 1;
}

.app-footer {
  margin-top: 40px;
  padding: 20px 0;
  text-align: center;
  color: #666;
  border-top: 1px solid #ddd;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .app-header h1 {
    font-size: 2rem;
  }

  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  .app-header h1 {
    font-size: 1.8rem;
  }

  .button-group {
    flex-direction: column;
    gap: 8px;
  }

  .file-input-label {
    text-align: center;
  }

  #start-btn {
    flex: none;
  }
}


.input-section {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

textarea {
  width: 100%;
  height: 200px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}

.word-count-display {
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #666;
  font-weight: 500;
  text-align: right;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.file-input-label {
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
  background-color: #17a2b8;
  color: white;
  display: inline-block;
}

.file-input-label:hover {
  background-color: #138496;
}

#quick-paste-btn {
  background-color: #6c757d;
  color: white;
}

#quick-paste-btn:hover {
  background-color: #5a6268;
}

#start-btn {
  background-color: #007bff;
  color: white;
  flex: 1;
}

#start-btn:hover {
  background-color: #0056b3;
}

.results-section {
  margin-top: 20px;
}

.buttons-section {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 16px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.button-item {
  display: inline-block;
}

.textareas-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.textarea-item {
  background: white;
  border-radius: 4px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.part-title {
  font-weight: bold;
  color: #333;
  margin-bottom: 12px;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.part-word-count {
  font-weight: normal;
  color: #666;
  font-size: 14px;
  margin-left: auto;
}

.part-textarea {
  width: 100%;
  height: 150px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  resize: vertical;
  box-sizing: border-box;
}

.copy-btn {
  background-color: #28a745;
  color: white;
  font-size: 12px;
  padding: 6px 12px;
}

.copy-btn:hover {
  background-color: #218838;
}

.status-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
  font-weight: 500;
}

.status-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* SVG Tool Styles */
.svg-input-section {
  margin-bottom: 20px;
}

.svg-input-section textarea {
  height: 200px;
  margin-bottom: 15px;
}

#svg-convert-btn {
  background-color: #046bd2;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

#svg-convert-btn:hover {
  background-color: #045cb4;
}

.svg-output-section {
  margin-top: 30px;
}

.svg-output-section h3 {
  margin-bottom: 10px;
  color: #555;
  font-size: 1.2rem;
}

.svg-base64-section {
  margin-top: 30px;
}

.svg-base64-section .part-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: bold;
  color: #333;
  font-size: 16px;
}

.svg-base64-section textarea {
  width: 100%;
  height: 120px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  resize: vertical;
  box-sizing: border-box;
}

.svg-preview-container {
  display: flex;
  justify-content: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#svg-preview {
  width: 120px;
  height: 120px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    height: 100vh;
    width: 250px;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
  }

  .sidebar.open {
    left: 0;
  }

  .main-wrapper {
    margin-left: 0;
    width: 100%;
  }

  .sidebar-nav {
    padding: 0 20px;
  }

  .nav-link {
    padding: 15px;
    margin-bottom: 5px;
    font-size: 16px;
  }

  .nav-icon {
    margin-right: 12px;
    font-size: 1.3rem;
  }

  /* SVG Tool Mobile Styles */
  .svg-input-section textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    height: 180px;
  }

  .svg-preview-container {
    padding: 15px;
  }

  #svg-preview {
    width: 100px;
    height: 100px;
  }

  .svg-base64-section .part-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
  }

  .svg-base64-section textarea {
    font-size: 12px;
    height: 100px;
  }

  #svg-convert-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .mobile-menu-toggle {
    top: 10px;
    left: 10px;
    padding: 8px;
  }

  .hamburger-line {
    width: 18px;
  }

  .sidebar {
    width: 100%;
    left: -100%;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-header h2 {
    font-size: 1.3rem;
  }

  .nav-link {
    padding: 12px;
    font-size: 14px;
  }

  .svg-input-section textarea {
    height: 150px;
  }

  .svg-preview-container {
    padding: 10px;
  }

  #svg-preview {
    width: 80px;
    height: 80px;
  }

  .svg-base64-section textarea {
    height: 80px;
    font-size: 11px;
  }

  #svg-convert-btn {
    padding: 10px 14px;
    font-size: 15px;
  }
}
