:root {
    /* Light theme variables */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-tertiary: #6c757d;
    --accent-primary: #7048e8;
    --accent-secondary: #5f3dc4;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --transition: 0.3s ease;
  }
  
  /* Dark theme variables */
  .dark-theme {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2d2d2d;
    --text-primary: #e9ecef;
    --text-secondary: #ced4da;
    --text-tertiary: #adb5bd;
    --accent-primary: #845ef7;
    --accent-secondary: #7048e8;
    --border-color: #444444;
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
  }
  
  body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color var(--transition), color var(--transition);
  }
  
  .app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
  }
  
  /* Header styles */
  .app-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    z-index: 10;
  }
  
  .logo-link {
    margin-right: 1rem;
  }
  
  .app-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
  }
  
  .icon-button {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
  }
  
  .icon-button:hover {
    background-color: var(--bg-tertiary);
  }
  
  .icon-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
  }
  
  .dark-theme .icon-dark,
  .icon-light {
    display: none;
  }
  
  .dark-theme .icon-light {
    display: block;
  }
  
  /* Main content styles */
  .main-content {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
  }
  
  /* Canvas container */
  .canvas-container {
    flex-grow: 1;
    position: relative;
  }
  
  /* Sidebar styles */
  .sidebar {
    width: 320px;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition);
    z-index: 5;
  }
  
  /* Tab navigation */
  .tab-container {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  .tab-buttons {
    display: flex;
    border-bottom: 1px solid var(--border-color);
  }
  
  .tab-button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
    border-bottom: 2px solid transparent;
  }
  
  .tab-button:hover {
    color: var(--accent-primary);
  }
  
  .tab-button.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
  }
  
  /* Panel styles */
  .tab-panel {
    display: none;
    padding: 1.5rem;
    overflow-y: auto;
  }
  
  .tab-panel.active {
    display: block;
  }
  
  .panel-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
  }
  
  /* Form elements */
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
  }
  
  .text-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  
  .text-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(112, 72, 232, 0.2);
  }
  
  .select-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c757d'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  
  .select-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(112, 72, 232, 0.2);
  }
  
  .hidden-select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  
  /* Toggle switch */
  .toggle-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    margin: 0 10px;
  }
  
  .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    transition: var(--transition);
    border-radius: 34px;
  }
  
  .toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: var(--bg-secondary);
    transition: var(--transition);
    border-radius: 50%;
  }
  
  .toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-primary);
  }
  
  .toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(30px);
  }
  
  /* Style options */
  .style-options {
    display: flex;
    gap: 10px;
    margin-top: 0.5rem;
  }
  
  .style-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s ease;
  }
  
  .style-option.active {
    border-color: var(--accent-primary);
  }
  
  .style-preview {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    background-color: var(--bg-tertiary);
  }
  
  .style-preview.edgy {
    clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 75% 100%, 0% 100%);
  }
  
  .style-preview.normal {
    border-radius: 8px;
  }
  
  .style-preview.smooth {
    border-radius: 25px;
  }
  
  /* Range slider */
  .range-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;  
    background: var(--bg-tertiary);
    outline: none;
  }
  
  .range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%; 
    background: var(--accent-primary);
    cursor: pointer;
  }
  
  .range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
  }
  
  /* Color picker */
  .color-picker-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .color-presets {
    display: flex;
    gap: 0.5rem;
  }
  
  .color-preset {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease;
    box-shadow: var(--shadow-sm);
  }
  
  .color-preset:hover {
    transform: scale(1.1);
  }
  
  /* Checkbox and Radio controls */
  .checkbox-group, .radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .checkbox-control, .radio-control {
    display: flex;
    align-items: center;
    cursor: pointer;
  }
  
  .checkbox-control input[type="checkbox"],
  .radio-control input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: var(--accent-primary);
  }
  
  /* Buttons */
  .primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
    width: 100%;
  }
  
  .primary-button:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-2px);
  }
  
  .primary-button:active {
    transform: translateY(0);
  }
  
  .button-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }
  
  /* Toast notification */
  .toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    z-index: 1000;
  }
  
  .toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  
  /* Mobile styles */
  @media (max-width: 768px) {
    .main-content {
      flex-direction: column;
    }
    
    .sidebar {
      width: 100%;
      max-height: 50%;
      border-left: none;
      border-top: 1px solid var(--border-color);
    }
  }