image2sand.css 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. /* Image Converter Dialog Styles */
  2. .image-converter-overlay {
  3. position: fixed;
  4. top: 0;
  5. left: 0;
  6. width: 100%;
  7. height: 100%;
  8. background-color: rgba(0, 0, 0, 0.7);
  9. z-index: 1000;
  10. display: flex;
  11. justify-content: center;
  12. align-items: center;
  13. opacity: 0;
  14. visibility: hidden;
  15. transition: opacity 0.3s, visibility 0.3s;
  16. }
  17. .image-converter-overlay.visible {
  18. opacity: 1;
  19. visibility: visible;
  20. }
  21. .image-converter-dialog {
  22. background-color: var(--background-secondary);
  23. border-radius: 8px;
  24. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  25. width: 90%;
  26. max-width: 1000px;
  27. max-height: 90vh;
  28. overflow-y: auto;
  29. padding: 20px;
  30. position: relative;
  31. color: var(--text-primary);
  32. }
  33. .image-converter-header {
  34. display: flex;
  35. justify-content: space-between;
  36. align-items: center;
  37. margin-bottom: 20px;
  38. border-bottom: 1px solid var(--border-primary);
  39. padding-bottom: 10px;
  40. }
  41. .image-converter-header h2 {
  42. margin: 0;
  43. color: var(--theme-secondary-hover);
  44. }
  45. .image-converter-close {
  46. background: none;
  47. border: none;
  48. font-size: 1.5rem;
  49. cursor: pointer;
  50. color: var(--text-primary);
  51. }
  52. .image-converter-grid {
  53. display: grid;
  54. grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  55. gap: 20px;
  56. margin-bottom: 20px;
  57. }
  58. .preview-controls-container {
  59. display: grid;
  60. grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
  61. gap: 20px;
  62. margin-bottom: 20px;
  63. }
  64. @media (max-width: 768px) {
  65. .image-converter-grid,
  66. .preview-controls-container {
  67. grid-template-columns: 1fr;
  68. }
  69. }
  70. .image-converter-settings {
  71. display: flex;
  72. flex-direction: column;
  73. gap: 15px;
  74. padding: 15px;
  75. background-color: var(--background-tertiary);
  76. border-radius: 6px;
  77. border: 1px solid var(--border-primary);
  78. }
  79. .image-converter-preview,
  80. .sand-garden-preview {
  81. display: flex;
  82. flex-direction: column;
  83. align-items: center;
  84. margin-bottom: 15px;
  85. }
  86. .image-converter-preview canvas,
  87. .sand-garden-preview canvas {
  88. max-width: 100%;
  89. border: 1px solid var(--border-primary);
  90. background-color: #FFFFFF;
  91. margin-bottom: 10px;
  92. width: 100%;
  93. height: auto;
  94. aspect-ratio: 1 / 1;
  95. object-fit: contain;
  96. min-height: 250px;
  97. }
  98. /* Ensure all canvases have the same size */
  99. #original-image, #edge-image, #dot-image, #connect-image {
  100. width: 100%;
  101. height: auto;
  102. aspect-ratio: 1 / 1;
  103. min-height: 250px;
  104. }
  105. .sand-garden-preview canvas {
  106. min-height: 250px;
  107. }
  108. .image-converter-preview h3,
  109. .sand-garden-preview h3 {
  110. margin-top: 0;
  111. margin-bottom: 8px;
  112. font-size: 1rem;
  113. color: var(--theme-secondary-hover);
  114. }
  115. .image-converter-actions {
  116. display: flex;
  117. justify-content: flex-end;
  118. gap: 15px;
  119. margin-top: 20px;
  120. padding-top: 15px;
  121. border-top: 1px solid var(--border-primary);
  122. }
  123. .image-converter-actions button {
  124. padding: 10px 20px;
  125. border-radius: 4px;
  126. cursor: pointer;
  127. font-weight: 500;
  128. display: flex;
  129. align-items: center;
  130. gap: 8px;
  131. }
  132. .image-converter-actions button i {
  133. font-size: 1.1rem;
  134. }
  135. .image-converter-actions .cancel {
  136. background-color: var(--color-error);
  137. color: var(--text-secondary);
  138. border: none;
  139. }
  140. .image-converter-actions .cta {
  141. background-color: var(--theme-primary);
  142. color: var(--text-secondary);
  143. border: none;
  144. }
  145. .slider-container {
  146. display: flex;
  147. flex-direction: column;
  148. width: 100%;
  149. }
  150. .slider-labels {
  151. display: flex;
  152. justify-content: space-between;
  153. font-size: 0.8rem;
  154. color: var(--text-primary);
  155. }
  156. .setting-item {
  157. display: flex;
  158. flex-direction: column;
  159. }
  160. .setting-item label {
  161. margin-bottom: 5px;
  162. font-weight: 500;
  163. color: var(--text-primary);
  164. }
  165. .setting-item select,
  166. .setting-item input {
  167. padding: 8px;
  168. border-radius: 4px;
  169. border: 1px solid var(--border-primary);
  170. background-color: var(--input-background);
  171. color: var(--input-text);
  172. }
  173. .checkbox-group {
  174. display: flex;
  175. flex-wrap: wrap;
  176. gap: 20px;
  177. margin: 10px 0;
  178. }
  179. .checkbox-container {
  180. display: flex;
  181. align-items: center;
  182. gap: 8px;
  183. white-space: nowrap;
  184. }
  185. .checkbox-container label {
  186. margin-bottom: 0;
  187. color: var(--text-primary);
  188. }
  189. .generate-button-container {
  190. display: flex;
  191. justify-content: center;
  192. margin-top: 15px;
  193. }
  194. .generate-button-container button {
  195. padding: 10px 20px;
  196. font-size: 1rem;
  197. background-color: var(--theme-primary);
  198. color: var(--text-secondary);
  199. border: none;
  200. border-radius: 4px;
  201. cursor: pointer;
  202. display: flex;
  203. align-items: center;
  204. gap: 8px;
  205. }
  206. .generate-button-container button:hover {
  207. background-color: var(--theme-primary-hover);
  208. }
  209. .processing-indicator {
  210. position: absolute;
  211. top: 0;
  212. left: 0;
  213. width: 100%;
  214. height: 100%;
  215. background-color: var(--background-translucent);
  216. display: flex;
  217. flex-direction: column;
  218. justify-content: center;
  219. align-items: center;
  220. z-index: 10;
  221. color: var(--text-secondary);
  222. font-size: 1.2rem;
  223. visibility: hidden;
  224. opacity: 0;
  225. transition: opacity 0.3s, visibility 0.3s;
  226. }
  227. .processing-indicator.visible {
  228. visibility: visible;
  229. opacity: 1;
  230. }
  231. .spinner {
  232. border: 4px solid rgba(255, 255, 255, 0.3);
  233. border-radius: 50%;
  234. border-top: 4px solid var(--theme-primary);
  235. width: 40px;
  236. height: 40px;
  237. animation: spin 1s linear infinite;
  238. margin-bottom: 15px;
  239. }
  240. @keyframes spin {
  241. 0% { transform: rotate(0deg); }
  242. 100% { transform: rotate(360deg); }
  243. }
  244. #total-points {
  245. margin-top: 10px;
  246. font-size: 0.9rem;
  247. color: var(--text-primary);
  248. }
  249. /* Ensure inputs and checkboxes match the theme */
  250. input[type="checkbox"] {
  251. accent-color: var(--theme-primary);
  252. }
  253. input[type="range"] {
  254. accent-color: var(--theme-primary);
  255. background-color: var(--input-background);
  256. }
  257. /* Ensure the dialog transitions smoothly with theme changes */
  258. .image-converter-dialog * {
  259. transition: background-color var(--transition-fast),
  260. color var(--transition-fast),
  261. border-color var(--transition-fast);
  262. }
  263. .gen-button {
  264. margin-left: 10px;
  265. }
  266. canvas#connect-image {
  267. clip-path: ellipse();
  268. }