/* Image Upload */
    .image-upload-area {
      border: 2px dashed var(--border);
      border-radius: 12px;
      padding: 32px;
      text-align: center;
      cursor: pointer;
      transition: all 0.2s;
      background: var(--surface-hover);
      position: relative;
      overflow: hidden;
    }

    .image-upload-area:hover {
      border-color: var(--accent);
      background: #f0f9ff;
    }

    .image-upload-area.has-image {
      padding: 0;
      border: 2px solid var(--accent);
    }

    .image-upload-area.has-video {
      padding: 0;
      border: 2px solid var(--accent);
    }

    .image-upload-area.has-video .upload-placeholder {
      display: none;
    }

    .image-upload-area.media-upload.drag-active {
      border-color: var(--accent);
      background: #eef2ff;
    }

    .upload-preview {
      width: 100%;
      height: 200px;
      object-fit: cover;
      border-radius: 10px;
      display: none;
    }

    .upload-preview.active {
      display: block;
    }

    .upload-preview.media-video-preview {
      background: #0b0b0b;
      object-fit: cover;
    }

    .upload-preview.media-video-preview.active {
      display: block;
    }

    .upload-placeholder {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }

    .upload-icon {
      font-size: 48px;
      opacity: 0.4;
    }

    .upload-text {
      font-size: 14px;
      color: var(--text-secondary);
      font-weight: 500;
    }

    .upload-hint {
      font-size: 12px;
      color: var(--text-tertiary);
    }

    .upload-file-info {
      font-size: 12px;
      color: var(--text-secondary);
      margin-top: 6px;
    }

    .media-preview-note {
      margin-top: 10px;
      font-size: 12px;
      color: var(--text-secondary);
    }

    .image-upload-input {
      display: none;
    }

    .remove-image-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 32px;
      height: 32px;
      background: rgba(0, 0, 0, 0.6);
      color: white;
      border: none;
      border-radius: 50%;
      cursor: pointer;
      font-size: 18px;
      display: none;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      z-index: 10;
    }

    .image-upload-area.has-image .remove-image-btn {
      display: flex;
    }

    .remove-image-btn:hover {
      background: rgba(220, 38, 38, 0.8);
      transform: scale(1.1);
    }

    /* Outfit/Location Card Preview */
    .item-card-preview {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      overflow: hidden;
      transition: all 0.2s;
    }

    .item-card-image {
      width: 100%;
      height: 150px;
      background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 48px;
      color: var(--text-tertiary);
    }

    .item-card-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .item-card-content {
      padding: 16px;
    }

    .item-preview-title {
      font-weight: 600;
      font-size: 15px;
      color: var(--text-primary);
      margin-bottom: 6px;
    }

    .item-preview-desc {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.5;
    }

    /* Task Preview */
    .task-preview {
      background: var(--surface-hover);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 12px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .task-checkbox-preview {
      width: 20px;
      height: 20px;
      border: 2px solid var(--border-strong);
      border-radius: 6px;
      flex-shrink: 0;
    }

    .task-content-preview {
      flex: 1;
    }

    .task-title-preview {
      font-weight: 600;
      font-size: 14px;
      color: var(--text-primary);
    }

    .task-owner-preview {
      font-size: 12px;
      color: var(--text-tertiary);
      margin-top: 2px;
    }

    /* Comment Preview */
    .comment-preview {
      background: var(--surface-hover);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 16px;
    }

    .comment-preview-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
    }

    .comment-preview-author {
      font-weight: 600;
      font-size: 14px;
    }

    .comment-preview-time {
      font-size: 12px;
      color: var(--text-tertiary);
    }

    .comment-preview-text {
      font-size: 14px;
      color: var(--text-secondary);
      line-height: 1.6;
    }

    /* Media Grid Preview */
    .media-preview-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
    }

    .media-preview-item {
      aspect-ratio: 4 / 3;
      background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
      border-radius: 8px;
      overflow: hidden;
      position: relative;
    }

    .media-preview-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .media-preview-item video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      background: #0b0b0b;
      display: block;
    }

    .media-preview-placeholder {
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 32px;
      color: var(--text-tertiary);
    }
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(4px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      padding: 20px;
    }

    .modal-overlay.active {
      display: flex;
      animation: fadeIn 0.2s ease;
    }

    .modal {
      background: var(--surface);
      border-radius: 16px;
      max-width: 900px;
      width: 100%;
      max-height: 90vh;
      overflow: hidden;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
      display: flex;
      flex-direction: column;
      animation: slideUp 0.3s ease;
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .modal-header {
      padding: 24px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .modal-title {
      font-family: 'Syne', sans-serif;
      font-size: 24px;
      font-weight: 700;
      margin: 0;
    }

    .modal-close {
      width: 32px;
      height: 32px;
      border: none;
      background: var(--surface-hover);
      border-radius: 8px;
      color: var(--text-secondary);
      font-size: 20px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }

    .modal-close:hover {
      background: var(--border);
      color: var(--text-primary);
    }

    .modal-body {
      padding: 24px;
      overflow-y: auto;
      flex: 1;
    }

    .modal-footer {
      padding: 20px 24px;
      border-top: 1px solid var(--border);
      display: flex;
      gap: 12px;
      justify-content: flex-end;
    }

    /* Two Column Modal Layout */
    .modal-columns {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
    }

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

    .column-title {
      font-family: 'Syne', sans-serif;
      font-size: 16px;
      font-weight: 700;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .column-title::before {
      content: '';
      width: 4px;
      height: 16px;
      background: var(--accent);
      border-radius: 2px;
    }

    /* Live Preview in Modal */
    .preview-container {
      position: sticky;
      top: 0;
    }

    .preview-label {
      font-size: 12px;
      color: var(--text-tertiary);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      font-weight: 600;
      margin-bottom: 12px;
    }

    .preview-card {
      background: var(--surface-hover);
      border: 2px dashed var(--border);
      border-radius: 12px;
      padding: 20px;
      margin-bottom: 16px;
    }

    .preview-hint {
      font-size: 13px;
      color: var(--text-tertiary);
      text-align: center;
      padding: 40px 20px;
      font-style: italic;
    }

    /* Character Avatar Selector */
    .avatar-selector {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin-top: 8px;
    }

    .avatar-option {
      aspect-ratio: 1;
      background: var(--surface-hover);
      border: 2px solid var(--border);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 32px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .avatar-option:hover {
      border-color: var(--accent);
      transform: scale(1.05);
    }

    .avatar-option.selected {
      border-color: var(--accent);
      background: linear-gradient(135deg, #dbeafe, #e0e7ff);
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

    /* Tag Input */
    .tag-input-container {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      padding: 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      min-height: 44px;
      background: var(--surface);
      cursor: text;
    }

    .tag-input-container:focus-within {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

    .tag-item {
      background: #e0f2fe;
      border: 1px solid #bae6fd;
      color: #0369a1;
      padding: 4px 10px;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .tag-remove {
      background: none;
      border: none;
      color: #0369a1;
      cursor: pointer;
      padding: 0;
      font-size: 16px;
      line-height: 1;
      opacity: 0.6;
      transition: opacity 0.2s;
    }

    .tag-remove:hover {
      opacity: 1;
    }

    .tag-input {
      border: none;
      outline: none;
      background: transparent;
      flex: 1;
      min-width: 100px;
      font-family: inherit;
      font-size: 14px;
    }

    .tag-input-wrap {
      position: relative;
    }

    .tag-suggestions {
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      right: 0;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      box-shadow: var(--shadow-sm);
      padding: 6px;
      display: none;
      z-index: 10;
      max-height: 220px;
      overflow: auto;
    }

    .tag-suggestion-item {
      width: 100%;
      text-align: left;
      border: 1px solid transparent;
      background: transparent;
      padding: 8px 10px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13px;
      color: var(--text-primary);
    }

    .tag-suggestion-item:hover {
      background: var(--surface-hover);
      border-color: var(--border);
    }

    @media (max-width: 768px) {
      .modal-columns {
        grid-template-columns: 1fr;
      }

      .preview-container {
        position: relative;
        order: -1;
      }

      .avatar-selector {
        grid-template-columns: repeat(3, 1fr);
      }
    }


    .media-preview-video {
      width: 100%;
      height: 180px;
      border-radius: 10px;
      object-fit: cover;
      background: #0b0b0b;
      display: block;
    }
