/* Shared gallery styles for character/sketch/object/anime/realistic/mixed pages */

.gallery-header { background: linear-gradient(135deg, #2c3e50, #34495e); color: white; text-align: center; padding: 120px 2rem 60px; margin-top: 70px; }
.gallery-title { font-size: 3rem; margin-bottom: 1rem; font-weight: 700; }
.gallery-subtitle { font-size: 1.2rem; opacity: 0.9; margin-bottom: 2rem; }
.back-button { display: inline-block; background: var(--secondary-color); color: white; padding: 12px 24px; text-decoration: none; border-radius: 25px; font-weight: 600; transition: transform 0.3s ease, box-shadow 0.3s ease; margin-bottom: 2rem; }
.back-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.upload-button { background: var(--accent-color); color: white; border: none; padding: 15px 30px; border-radius: 25px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; margin-top: 1rem; display: inline-flex; align-items: center; gap: 10px; }
.upload-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); background: #e67e22; }

.gallery-info { background: var(--light-bg); padding: 40px 2rem; text-align: center; }
.gallery-description { max-width: 800px; margin: 0 auto; font-size: 1.1rem; line-height: 1.8; color: #666; }

.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; padding: 0 2rem; max-width: 1400px; margin: 0 auto; }
.image-item { background: white; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; position: relative; }
.image-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.image-item img { width: 100%; height: 300px; object-fit: cover; display: block; }

/* View Modal */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.95); animation: fadeIn 0.3s ease; }
.modal-content { position: relative; margin: auto; padding: 0; width: 95%; max-width: 1200px; max-height: 90vh; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; }
.modal-image { max-width: 100%; max-height: 90vh; border-radius: 10px; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); object-fit: contain; }
.modal-close { position: absolute; top: -50px; right: 0; color: white; font-size: 40px; font-weight: bold; cursor: pointer; background: rgba(0, 0, 0, 0.7); border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; transition: background 0.3s ease; }
.modal-close:hover { background: rgba(255, 255, 255, 0.2); }
.modal-navigation { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.7); color: white; border: none; font-size: 30px; padding: 20px 25px; cursor: pointer; border-radius: 5px; transition: background 0.3s ease; }
.modal-prev { left: 20px; }
.modal-next { right: 20px; }
.modal-navigation:hover { background: rgba(255, 255, 255, 0.2); }
.modal-info { position: absolute; bottom: -80px; left: 0; right: 0; color: white; text-align: center; background: rgba(0, 0, 0, 0.8); padding: 20px; border-radius: 10px; }
.modal-counter { position: absolute; top: -50px; left: 0; color: white; background: rgba(0, 0, 0, 0.7); padding: 10px 15px; border-radius: 20px; font-size: 0.9rem; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Upload Modal */
.upload-modal { display: none; position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); animation: fadeIn 0.3s ease; }
.upload-modal-content { position: relative; background: white; margin: 5% auto; padding: 30px; width: 90%; max-width: 600px; border-radius: 15px; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3); max-height: 80vh; overflow-y: auto; }
.upload-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid var(--light-bg); }
.upload-modal-title { font-size: 1.5rem; color: var(--primary-color); font-weight: 700; }
.upload-modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #999; transition: color 0.3s ease; }
.upload-modal-close:hover { color: var(--secondary-color); }
.upload-area { border: 3px dashed var(--primary-color); border-radius: 10px; padding: 40px 20px; text-align: center; background: var(--light-bg); margin-bottom: 20px; transition: all 0.3s ease; cursor: pointer; }
.upload-area:hover, .upload-area.dragover { border-color: var(--accent-color); background: #fef9e7; }
.upload-area i { font-size: 3rem; color: var(--primary-color); margin-bottom: 15px; }
.upload-area p { font-size: 1.1rem; color: var(--primary-color); margin-bottom: 10px; }
.upload-area small { color: #666; font-size: 0.9rem; }
.file-input { display: none; }
.preview-container { margin-top: 20px; }
.preview-title { font-size: 1.2rem; color: var(--primary-color); margin-bottom: 15px; font-weight: 600; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; margin-bottom: 20px; }
.preview-item { position: relative; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.preview-image { width: 100%; height: 120px; object-fit: cover; display: block; }
.preview-remove { position: absolute; top: 5px; right: 5px; background: var(--secondary-color); color: white; border: none; border-radius: 50%; width: 25px; height: 25px; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; transition: background 0.3s ease; }
.preview-remove:hover { background: #c0392b; }
.upload-form { border-top: 2px solid var(--light-bg); padding-top: 20px; }
.form-group { margin-bottom: 15px; }
.form-label { display: block; margin-bottom: 5px; font-weight: 600; color: var(--primary-color); }
.form-input, .form-textarea { width: 100%; padding: 10px 15px; border: 2px solid var(--light-bg); border-radius: 8px; font-size: 1rem; transition: border-color 0.3s ease; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--accent-color); }
.form-textarea { resize: vertical; min-height: 80px; }
.upload-submit { background: var(--secondary-color); color: white; border: none; padding: 15px 30px; border-radius: 25px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; width: 100%; }
.upload-submit:hover { background: #c0392b; transform: translateY(-2px); }
.upload-submit:disabled { background: #bdc3c7; cursor: not-allowed; transform: none; }
.success-message { background: #2ecc71; color: white; padding: 30px 20px; border-radius: 12px; text-align: center; margin: 20px 0; display: none; box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3); }
.success-message h3 { margin-bottom: 10px; font-size: 1.3rem; }
.success-message p { margin: 0; opacity: 0.9; }
.success-message i { font-size: 2rem; margin-bottom: 15px; display: block; }

@media (max-width: 768px) {
  .gallery-title { font-size: 2rem; }
  .image-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; padding: 0 1rem; }
  .image-item img { height: 250px; }
  .modal-content { width: 98%; }
  .modal-close { top: -40px; font-size: 30px; width: 40px; height: 40px; }
  .modal-navigation { font-size: 24px; padding: 15px 20px; }
  .modal-info { bottom: -60px; padding: 15px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .image-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .image-item img { height: 200px; }
}


