/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: #0d0d0d;
    color: #ccc;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.05em;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    font-size: 0.9rem;
    color: #999;
    transition: color 0.25s;
    letter-spacing: 0.03em;
}

.nav a:hover {
    color: #fff;
}

/* ===== Hero ===== */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 50%, #0d0d0d 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    animation: heroBg 20s ease-in-out infinite alternate;
}

@keyframes heroBg {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-2%, -2%); }
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 1;
}

.hero p {
    margin-top: 20px;
    font-size: 1rem;
    color: #777;
    letter-spacing: 0.2em;
    position: relative;
    z-index: 1;
}

.btn {
    display: inline-block;
    margin-top: 40px;
    padding: 14px 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    transition: all 0.35s;
    position: relative;
    z-index: 1;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ===== Filter Bar ===== */
.filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 50px 24px 30px;
}

.filter-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #999;
    padding: 8px 24px;
    font-size: 0.85rem;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: all 0.3s;
    font-family: inherit;
}

.filter-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.filter-btn.active {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* ===== Gallery ===== */
.gallery-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px 80px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 8px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: auto;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover::after {
    background: rgba(0, 0, 0, 0.25);
}

/* Span 2 rows for variety */
.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

/* ===== About ===== */
.about-section {
    padding: 100px 24px;
    background: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.about-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-size: 1.8rem;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
}

.about-content p {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 12px;
    line-height: 1.8;
}

/* ===== Contact ===== */
.contact-section {
    padding: 80px 24px;
    text-align: center;
}

.contact-section h2 {
    font-size: 1.8rem;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
}

.contact-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.contact-links a {
    color: #aaa;
    font-size: 0.95rem;
    transition: color 0.25s;
}

.contact-links a:hover {
    color: #fff;
}

.divider {
    color: #444;
}

/* ===== Footer ===== */
.footer {
    padding: 30px 24px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer p {
    font-size: 0.8rem;
    color: #555;
}
  .footer p + p {
        margin-top: 8px;
     }
     
      .footer-beian {
          display: flex;
         align-items: center;
         justify-content: center;
          gap: 6px;
         font-size: 0.75rem !important;
          color: #666 !important;
      }
      
      .beian-icon {
         font-size: 0.9rem;
      }
/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 2.5rem;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.25s;
}

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

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: #999;
    cursor: pointer;
    padding: 16px;
    user-select: none;
    transition: color 0.25s;
    z-index: 10;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #fff;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ===== Lightbox info ===== */
.lightbox-info {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: #888;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

/* ===== Admin Trigger ===== */
.admin-trigger {
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #aaa;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.06em;
    border-radius: 3px;
    transition: all 0.3s;
}

.admin-trigger:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* ===== Admin Overlay ===== */
.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.admin-overlay.active {
    display: flex;
}

.admin-panel {
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    width: 90vw;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
}

/* ===== Admin Login ===== */
.admin-login {
    text-align: center;
}

.admin-login h2 {
    font-size: 1.5rem;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.08em;
    margin-bottom: 28px;
}

.admin-login form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.admin-login input[type="text"],
.admin-login input[type="password"] {
    width: 260px;
    padding: 12px 16px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.admin-login input[type="text"]:focus,
.admin-login input[type="password"]:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

.admin-login input:-webkit-autofill,
.admin-login input:-webkit-autofill:hover,
.admin-login input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #111 inset !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    transition: background-color 9999s ease-in-out 0s;
}

.hint {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #555;
}

/* ===== Admin Dashboard ===== */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-header h2 {
    font-size: 1.3rem;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.08em;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ===== Buttons ===== */
.btn-sm {
    display: inline-block;
    padding: 8px 20px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    margin-top: 0;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.btn-import {
    cursor: pointer;
}

.btn-danger {
    border-color: rgba(255, 80, 80, 0.3);
    color: #e55;
}

.btn-danger:hover {
    border-color: rgba(255, 80, 80, 0.7);
    background: rgba(255, 80, 80, 0.08);
}

.btn-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #666;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.25s;
}

.btn-close:hover {
    color: #fff;
}

/* ===== Upload Zone ===== */
.upload-zone {
    border: 1px dashed rgba(255, 255, 255, 0.15);
    padding: 20px;
    margin-bottom: 28px;
    border-radius: 4px;
}

.upload-preview {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: #111;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.upload-preview:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.upload-preview span {
    color: #555;
    font-size: 0.9rem;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-fields {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-fields input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 10px 14px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.upload-fields input[type="text"]:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

.upload-fields select {
    padding: 10px 14px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

.upload-fields select option {
    background: #1a1a1a;
}

#btnUpload:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== Photo List ===== */
.photo-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.list-empty {
    text-align: center;
    color: #555;
    padding: 30px 0;
    font-size: 0.9rem;
}

.photo-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: #111;
    border-radius: 4px;
    transition: background 0.2s;
}

.photo-list-item:hover {
    background: #181818;
}

.photo-list-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.photo-list-info {
    flex: 1;
    min-width: 0;
}

.photo-list-title {
    color: #ddd;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-list-cat {
    color: #666;
    font-size: 0.75rem;
    margin-top: 2px;
    text-transform: capitalize;
}

.photo-list-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.photo-list-actions button {
    padding: 5px 12px;
    font-size: 0.75rem;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    cursor: pointer;
    font-family: inherit;
    border-radius: 3px;
    transition: all 0.2s;
}

.photo-list-actions button:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.photo-list-actions .btn-del:hover {
    border-color: rgba(255, 80, 80, 0.5);
    color: #e55;
}

/* ===== Gallery Empty ===== */
.gallery-empty {
    text-align: center;
    padding: 80px 24px;
}

.gallery-empty p:first-child {
    font-size: 1.2rem;
    color: #555;
}

.gallery-empty p:last-child {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #444;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav {
        gap: 20px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 4px;
    }

    .gallery-item.wide {
        grid-column: span 1;
    }

    .gallery-item.tall {
        grid-row: span 1;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 1.8rem;
        padding: 8px;
    }
}
