﻿    /* ========== MODAL UNSPLASH ========== */
    .unsplash-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.7);
      backdrop-filter: blur(4px);
      z-index: 10000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .unsplash-modal-overlay.active {
      display: flex;
    }
    .unsplash-modal {
      background: var(--panel);
      border-radius: 20px;
      max-width: 900px;
      width: 100%;
      max-height: 85vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
      animation: modalSlideIn 0.3s ease;
    }
    @keyframes modalSlideIn {
      from { opacity: 0; transform: scale(0.95) translateY(20px); }
      to { opacity: 1; transform: scale(1) translateY(0); }
    }
    .unsplash-modal-header {
      padding: 20px 24px;
      border-bottom: 1px solid var(--edge);
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
    }
    .unsplash-modal-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .unsplash-modal-close {
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: var(--muted);
      padding: 4px 8px;
      border-radius: 8px;
      transition: all 0.2s;
    }
    .unsplash-modal-close:hover {
      background: var(--edge);
      color: var(--text);
    }
    .unsplash-search-bar {
      padding: 16px 24px;
      border-bottom: 1px solid var(--edge);
      display: flex;
      gap: 12px;
      flex-shrink: 0;
    }
    .unsplash-search-input {
      flex: 1;
      padding: 12px 16px;
      border: 2px solid var(--edge);
      border-radius: 12px;
      font-size: 15px;
      font-family: inherit;
      transition: all 0.2s;
    }
    .unsplash-search-input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 4px rgba(53,117,246,0.1);
    }
    .unsplash-search-btn {
      padding: 12px 24px;
      background: var(--accent);
      color: white;
      border: none;
      border-radius: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .unsplash-search-btn:hover {
      background: #2563eb;
      transform: translateY(-1px);
    }
    .unsplash-search-btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }
    .unsplash-modal-body {
      flex: 1;
      overflow-y: auto;
      padding: 20px 24px;
    }
    .unsplash-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
    }
    .unsplash-image-card {
      position: relative;
      aspect-ratio: 4/3;
      border-radius: 12px;
      overflow: hidden;
      cursor: pointer;
      border: 3px solid transparent;
      transition: all 0.2s;
    }
    .unsplash-image-card:hover {
      transform: scale(1.02);
      box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }
    .unsplash-image-card.selected {
      border-color: var(--accent);
      box-shadow: 0 0 0 4px rgba(53,117,246,0.2);
    }
    .unsplash-image-card img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .unsplash-image-check {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 28px;
      height: 28px;
      background: var(--accent);
      border-radius: 50%;
      display: none;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 14px;
      box-shadow: 0 2px 8px rgba(53,117,246,0.4);
    }
    .unsplash-image-card.selected .unsplash-image-check {
      display: flex;
    }
    .unsplash-image-credit {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 8px 10px;
      background: linear-gradient(transparent, rgba(0,0,0,0.7));
      color: white;
      font-size: 11px;
      opacity: 0;
      transition: opacity 0.2s;
    }
    .unsplash-image-card:hover .unsplash-image-credit {
      opacity: 1;
    }
    .unsplash-modal-footer {
      padding: 16px 24px;
      border-top: 1px solid var(--edge);
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
    }
    .unsplash-selection-count {
      font-size: 14px;
      color: var(--muted);
    }
    .unsplash-selection-count strong {
      color: var(--accent);
    }
    .unsplash-confirm-btn {
      padding: 12px 28px;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: white;
      border: none;
      border-radius: 12px;
      font-weight: 600;
      font-size: 15px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .unsplash-confirm-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(53,117,246,0.3);
    }
    .unsplash-confirm-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }
    .unsplash-loading, .unsplash-empty {
      text-align: center;
      padding: 60px 20px;
      color: var(--muted);
    }
    .unsplash-loading-spinner {
      width: 40px;
      height: 40px;
      border: 3px solid var(--edge);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin: 0 auto 16px;
    }
    .unsplash-suggestions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;
      justify-content: center;
    }
    .unsplash-suggestion-tag {
      padding: 6px 14px;
      background: var(--edge);
      border: none;
      border-radius: 20px;
      font-size: 13px;
      color: var(--text);
      cursor: pointer;
      transition: all 0.2s;
    }
    .unsplash-suggestion-tag:hover {
      background: var(--accent);
      color: white;
    }
    
    /* ========== MODE PLACEMENT IMAGE ========== */
    .placement-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.85);
      z-index: 10001;
      display: none;
      flex-direction: column;
    }
    .placement-overlay.active {
      display: flex;
    }
    .placement-header {
      padding: 16px 24px;
      background: var(--panel);
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid var(--edge);
    }
    .placement-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text);
    }
    .placement-instruction {
      font-size: 14px;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .placement-cancel-btn {
      padding: 8px 16px;
      background: var(--edge);
      border: none;
      border-radius: 8px;
      color: var(--text);
      cursor: pointer;
      font-weight: 500;
    }
    .placement-cancel-btn:hover {
      background: #dce3f0;
    }
    .placement-preview-container {
      flex: 1;
      display: flex;
      gap: 20px;
      padding: 20px;
      overflow: hidden;
    }
    .placement-iframe-wrapper {
      flex: 1;
      background: white;
      border-radius: 12px;
      overflow: hidden;
      position: relative;
    }
    .placement-iframe-wrapper iframe {
      width: 100%;
      height: 100%;
      border: none;
    }
    .placement-image-preview {
      width: 200px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .placement-current-image {
      width: 100%;
      aspect-ratio: 4/3;
      border-radius: 12px;
      overflow: hidden;
      border: 3px solid var(--accent);
    }
    .placement-current-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .placement-image-info {
      font-size: 13px;
      color: white;
      text-align: center;
      opacity: 0.8;
    }
    
