* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, sans-serif; background: #f5f5f5; min-height: 100vh; }
header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.1); }
header h1 { font-size: 1.5rem; }
button { padding: .5rem 1rem; border: none; border-radius: 4px; background: #1890ff; color: #fff; cursor: pointer; }
button:hover { background: #40a9ff; }
#gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; padding: 2rem; }
.card { background: #fff; border-radius: 8px; overflow: hidden; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: transform .2s; }
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; height: 180px; object-fit: cover; }
.card .name { padding: .5rem; font-size: .85rem; color: #333; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-content { background: #fff; padding: 2rem; border-radius: 8px; min-width: 300px; }
.modal-content input { display: block; width: 100%; margin: .5rem 0; padding: .5rem; border: 1px solid #ddd; border-radius: 4px; }
.modal-content button { margin: .5rem .5rem 0 0; }
.preview { max-width: 90vw; max-height: 90vh; text-align: center; position: relative; }
.preview img { max-width: 80vw; max-height: 70vh; border-radius: 4px; }
.preview-actions { margin-top: 1rem; }
.preview::before { content: 'picture.aigc.sx.cn'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-30deg); font-size: 2rem; color: rgba(255,255,255,.3); pointer-events: none; z-index: 10; white-space: nowrap; text-shadow: 0 0 4px rgba(0,0,0,.3); }
