body{
    /* width:70px; */
    margin:0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  }

  canvas{
    width:100vw;
    height:100vh;
    padding:-20;
  }

  /* Admin Floating Button */
  .admin-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 1000;
  }

  .admin-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  }

  .admin-fab:active {
    transform: scale(0.95);
  }

  /* Modal */
  .modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
  }

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

  .modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s;
  }

  @keyframes slideDown {
    from {
      transform: translateY(-50px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
  }

  .close:hover,
  .close:focus {
    color: #000;
  }

  /* Login View */
  #login-view {
    text-align: center;
    padding: 40px 20px;
  }

  #login-view h2 {
    margin-bottom: 30px;
    color: #333;
  }

  #admin-password {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
  }

  #admin-password:focus {
    outline: none;
    border-color: #667eea;
  }

  #login-btn {
    padding: 12px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
  }

  #login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  }

  #login-btn:active {
    transform: translateY(0);
  }

  .error {
    color: #dc3545;
    margin-top: 15px;
    font-size: 14px;
  }

  /* Admin Panel */
  #admin-panel h2 {
    margin-top: 0;
    color: #333;
  }

  .section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
  }

  .section h3 {
    margin-top: 0;
    color: #555;
  }

  /* Drop Zone */
  .drop-zone {
    border: 3px dashed #ccc;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
  }

  .drop-zone:hover {
    border-color: #667eea;
    background: #f0f4ff;
  }

  .drop-zone.drag-over {
    border-color: #667eea;
    background: #e6edff;
    transform: scale(1.02);
  }

  .drop-zone p {
    color: #666;
    font-size: 16px;
    margin: 0;
  }

  /* Progress Bar */
  .progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0 10px;
  }

  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
  }

  .progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 5px 0;
  }

  /* Photo Grid */
  .photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
  }

  .photo-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    background: white;
  }

  .photo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  }

  .photo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }

  .photo-card-info {
    padding: 10px;
  }

  .photo-card-info .filename {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .photo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0;
    min-height: 24px;
  }

  .tag {
    background: #e0e7ff;
    color: #4c51bf;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
  }

  .tag.user-tag {
    background: #fef3c7;
    color: #92400e;
  }

  .tag.tag-removable {
    cursor: pointer;
    transition: background 0.2s;
  }

  .tag.tag-removable:hover {
    background: #fecaca;
    color: #991b1b;
  }

  .tag-x {
    margin-left: 4px;
    font-weight: bold;
    font-size: 13px;
  }

  .tag.tag-hidden {
    background: #f3f4f6;
    color: #9ca3af;
    text-decoration: line-through;
    cursor: pointer;
    transition: background 0.2s;
  }

  .tag.tag-hidden:hover {
    background: #d1fae5;
    color: #065f46;
    text-decoration: none;
  }

  .tag-restore {
    margin-left: 4px;
    font-weight: bold;
    font-size: 13px;
  }

  .photo-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
  }

  .btn-small {
    flex: 1;
    padding: 6px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
  }

  .btn-small:hover {
    opacity: 0.8;
  }

  .btn-edit {
    background: #667eea;
    color: white;
  }

  .btn-delete {
    background: #dc3545;
    color: white;
  }

  .refresh-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 15px;
  }

  .refresh-btn:hover {
    opacity: 0.9;
  }

  .loading {
    text-align: center;
    color: #666;
    padding: 40px;
  }

  .logout-btn {
    margin-top: 20px;
    padding: 10px 24px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
  }

  .logout-btn:hover {
    background: #5a6268;
  }

  /* Gallery FAB Button */
  .gallery-fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 1000;
  }

  .gallery-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  }

  .gallery-fab:active {
    transform: scale(0.95);
  }

  /* Gallery Modal Content */
  .gallery-content {
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Gallery Filters */
  .gallery-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }

  .gallery-filters input[type="text"],
  .gallery-filters input[type="date"] {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
  }

  .btn-search,
  .btn-clear {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
  }

  .btn-search {
    background: #667eea;
    color: white;
  }

  .btn-clear {
    background: #e0e0e0;
    color: #333;
  }

  .btn-search:hover,
  .btn-clear:hover {
    opacity: 0.8;
  }

  /* Gallery Grid */
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
  }

  .gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    background: white;
    cursor: pointer;
  }

  .gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }

  .gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
  }

  .gallery-item-info {
    padding: 12px;
  }

  .gallery-item-info .date {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
  }

  /* Lightbox */
  .lightbox {
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  .lightbox[hidden] {
    display: none;
  }

  .lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3001;
  }

  .lightbox-close:hover {
    color: #ccc;
  }

  .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3001;
    padding: 16px;
    user-select: none;
    opacity: 0.7;
    transition: opacity 0.2s;
  }

  .lightbox-nav:hover {
    opacity: 1;
  }

  .lightbox-prev {
    left: 20px;
  }

  .lightbox-next {
    right: 20px;
  }

  #lightbox-img {
    max-width: 95%;
    max-height: 90vh;
    object-fit: contain;
    transition: opacity 0.15s;
  }

  #lightbox-img.loading {
    opacity: 0;
  }

  .lightbox-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 40px 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.3s;
  }

  .lightbox:hover .lightbox-info {
    opacity: 1;
  }

  .lightbox-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
  }

  #lightbox-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
  }

  #lightbox-tags .tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
  }

  /* Scroll sentinel for infinite scroll */
  .scroll-sentinel {
    text-align: center;
    padding: 20px;
    color: #999;
  }