@media (max-width: 899px) {
  .app {
    padding: 12px 16px;
    gap: 16px;
    height: auto !important;
    overflow: visible !important;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header .controls {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .header .controls button {
    flex: 1;
  }

  .editor-area {
    grid-template-columns: 1fr;
    gap: 16px;
    height: auto !important;
  }

  .panel {
    height: auto !important;
    min-height: 400px;
  }
  
  .panel-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .panel-actions {
    width: 100%;
    justify-content: flex-end;
  }

  /* 移动端控件样式优化 */
  .controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .pill-input {
    width: 100%;
    flex: 1;
    min-width: 0;
    justify-content: space-between;
  }

  .pill-select {
    flex: 1;
    min-width: 0;
  }

  .pill-select-trigger {
    width: 100%;
    justify-content: space-between;
  }

  .pill-select-menu {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
    margin-top: 0;
    padding: 16px 8px 32px;
    z-index: 10001 !important;
    animation: slideUp 0.3s ease-out;
  }

  .pill-select-option {
    padding: 12px 16px;
    font-size: 15px;
  }

  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  /* 移动端遮罩层 */
  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
  }

  .mobile-overlay.show {
    display: block;
  }
}

@media (max-width: 1024px) {
  .app-footer {
    margin-left: 0 !important;
  }
}

@media (max-width: 768px) {
  .app-footer {
    margin-left: 0 !important;
    padding: 0 0 12px !important;
    flex-wrap: wrap;
  }
}
