:root {
  --main-gradient: linear-gradient(135deg, #b6d0f7 0%, #e0e7ff 40%, #f8fafc 100%);
  --main-glass: rgba(255,255,255,0.65);
  --main-blur: blur(18px);
  --main-shadow: 0 8px 32px #a5b4fc55;
  --main-radius: 18px;
  --main-border: 1.5px solid #e0e7ffcc;
  --main-accent: #2563eb;
  --main-accent2: #34d399;
  --main-danger: #d32f2f;
  --main-warning: #f59e42;
  --main-success: #22c55e;
  --main-dark: #222b45;
  --main-light: #fff;
  --main-text: #222b45;
  --main-text-light: #fff;
  --main-muted: #888;
}

html, body {
    height: 100%;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: 'Roboto', '微软雅黑', Arial, sans-serif;
    background: var(--main-gradient) !important;
    color: var(--main-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 90px;
}
main {
    flex: 1 0 auto;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--main-glass);
    backdrop-filter: var(--main-blur);
    box-shadow: var(--main-shadow);
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    margin: 18px auto 0 auto;
    max-width: 1200px;
    width: 100%;
    border: var(--main-border);
    color: var(--main-accent);
    padding: 0 24px;
    height: 60px;
    gap: 18px;
    box-sizing: border-box;
    overflow-x: auto;
}
.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    flex: 0 0 auto;
    white-space: nowrap;
    color: var(--main-accent);
    text-shadow: 0 2px 8px #a5b4fc33;
}
.navbar .nav-center-subtitle {
    flex: 1 1 0%;
    text-align: center;
    font-size: 1.1rem;
    color: #e0e7ef;
    letter-spacing: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    margin: 0 12px;
}
.navbar .nav-links {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-shrink: 0;
}
.navbar .nav-links a {
    color: var(--main-accent);
    background: #fff;
    border-radius: 8px;
    padding: 6px 14px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.18s, color 0.18s;
}
.navbar .nav-links a:hover {
    background: var(--main-accent);
    color: var(--main-text-light);
}

.nav-search-bar, .nav-search-bar.search-align {
    margin: 0 0 0 0 !important;
    padding-left: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    justify-content: flex-start;
}
.nav-search-bar {
    display: flex;
    align-items: center;
    margin: 0 0 0 32px;
    padding-top: 10px;
    padding-bottom: 10px;
}
.nav-search-bar input[type="text"] {
    width: 260px;
    padding: 10px 14px;
    border: 1px solid #c7d2fe;
    border-radius: 0 !important;
    font-size: 1rem;
    outline: none;
    height: 40px;
    box-sizing: border-box;
    margin-right: 0;
}
.nav-search-bar button {
    height: 40px;
    padding: 0 18px;
    border: none;
    background: var(--main-accent);
    color: #fff;
    border-radius: 0 !important;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin-left: -1px;
}
.nav-search-bar button:hover {
    background: #1e40af;
}

.soft-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 32px 24px;
        margin: 32px auto 0 auto;
        max-width: calc(5 * 220px + 4 * 24px);
        perspective: 1800px;
        perspective-origin: 50% 30%;
}
@media (min-width:601px) and (max-width:1100px) {
    .soft-list { justify-content: center; }
    .soft-card { flex: 1 1 180px; max-width: 240px; width: auto; }
}

.soft-card {
    background: var(--main-glass);
    backdrop-filter: var(--main-blur);
    border-radius: var(--main-radius);
    box-shadow: 0 8px 32px 0 #2563eb33, 0 1.5px 8px #34d39922, 0 0 0 1.5px #fff8 inset;
    border: var(--main-border);
    width: 220px;
    max-width: 220px;
    min-width: 180px;
    min-height: 280px;
    height: 280px;
    margin: 0;
    padding: 0 0 6px 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    position: relative;
    transition: box-shadow 0.16s ease-out, transform 0.16s ease-out, border 0.16s ease-out;
    font-size: 0.5rem;
    will-change: transform, box-shadow;
    overflow: hidden;
}
.soft-card:hover {
    transform: translateY(-8px) scale(1.045); 
    box-shadow: 0 16px 48px #b6d0f744, 0 6px 24px #34d39933, 0 0 0 2.5px #34d399cc inset;
    z-index: 10;
}
.soft-card > *:not(.soft-desc) {
    z-index: 3;
}
.soft-img-wrap {
    width: 100%;
    height: 80px; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--main-radius) var(--main-radius) 0 0;
    background: linear-gradient(90deg, #e0e7ff 60%, #b6d0f7 100%);
    box-sizing: border-box;
    box-shadow: 0 4px 24px #a5b4fc33, 0 0 0 2px #34d39922 inset;
    position: relative;
}
.soft-img-wrap::after {
    content: '';
    position: absolute;
    left: 50%; top: 80%;
    transform: translate(-50%, 0);
    width: 60%; height: 18px;
    background: radial-gradient(ellipse at center, #2563eb22 0%, transparent 80%);
    opacity: 0.7;
    filter: blur(2px);
    z-index: 2;
    pointer-events: none;
}
.soft-img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    object-position: center;
    display: block;
    margin: 0 auto;
    border-radius: var(--main-radius) var(--main-radius) 0 0;
    image-rendering: auto;
}
.soft-img-wrap:hover .soft-img {
    transform: scale(1.06);
    transition: transform 0.2s;
}
.soft-title {
    font-size: 1.12rem;
    color: #222b45;
    font-weight: 800;
    margin: 8px 7px 2px 7px;
    word-break: break-all;
    text-align: left;
    min-height: 18px;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #a5b4fc22, 0 1px 0 #fff;
}
.soft-desc-area {
    flex: 1 1 auto;
    min-height: 27px;
    max-height: none;
    height: auto;
    width: calc(100% - 14px);
    margin: 0 7px 0 7px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    position: relative;
    background: none;
    box-sizing: border-box;
    filter: drop-shadow(0 2px 8px #a5b4fc22);
}
.soft-desc {
    width: 100%;
    font-size: clamp(0.58rem, 1vw, 1.05rem); 
    line-height: 1.5;
    max-height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    box-orient: vertical;
    white-space: normal;
    color: #222b45;
    font-weight: 500;
    font-family: '微软雅黑', Arial, sans-serif;
    box-sizing: border-box;
    word-break: break-all;
    margin: 0;
    background: none;
    border-radius: 0 0 12px 12px;
    display: block;
    text-align: left;
    overflow-wrap: break-word;
    overflow: hidden;
    padding: 0;
    white-space: pre-line;
    height: 100%;
    max-height: 100%;
}
.soft-footer {
    margin-top: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 6px 7px 0 7px;
    border-top: 1px dashed #e0e7ef;
    background: linear-gradient(90deg, #f8fafc 60%, #e0e7ff 100%);
    box-sizing: border-box;
    box-shadow: 0 -2px 12px #e0e7ff33 inset;
}
.soft-size {
    color: var(--main-muted);
    font-size: 0.48rem;
    margin-bottom: 0;
    text-align: left;
    padding-left: 2px;
}
.download-btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    min-height: 22px;
    font-size: 0.54rem;
    margin-bottom: 0;
    background: linear-gradient(90deg, #34d399 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px #a7f3d0;
    transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
}
.download-btn:hover {
    background: linear-gradient(90deg, #2563eb 0%, #34d399 100%);
    box-shadow: 0 4px 16px #a5b4fc80;
    transform: scale(1.04);
}
.soft-download-count {
    text-align: right;
    width: 100%;
    font-size: 0.48rem;
    color: var(--main-warning);
    margin-top: 2px;
}
.no-result {
    text-align: center;
    color: #888;
    font-size: 1.1rem;
    margin: 40px 0 0 0;
}
footer {
    flex-shrink: 0;
    text-align: center;
    color: #888;
    font-size: 1rem;
    background: var(--main-glass) !important;
    width: 100%;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 30;
    border-radius: 0 0 var(--main-radius) var(--main-radius);
    box-shadow: 0 -2px 12px #a5b4fc33;
    border: var(--main-border);
    transition: var(--main-transition);
}
.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
    width: 100%;
}
.footer-left, .footer-right {
    font-size: 1rem;
    color: #888;
    line-height: 1.8;
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-right {
    justify-content: flex-end;
}
.footer-beian:hover {
    color: #2563eb;
    text-decoration: underline;
}
.footer-corner {
    position: fixed;
    right: 24px;
    bottom: 18px;
    color: #888;
    font-size: 1rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    background: none !important;
    border-radius: 0;
    box-shadow: none !important;
    padding: 0;
    backdrop-filter: none !important;
}
.footer-corner a {
    color: #2563eb;
    text-decoration: none;
}
.footer-divider {
    color: #bbb;
    margin: 0 4px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0 32px 0;
    flex-wrap: wrap;
}
.page-btn {
    display: inline-block;
    padding: 6px 14px;
    background: var(--main-glass);
    color: var(--main-accent);
    border: var(--main-border);
    border-radius: 5px;
    margin: 0 2px;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.1s;
    cursor: pointer;
    box-shadow: 0 2px 8px #2563eb22, 0 0 0 1.5px #fff8 inset;
    font-weight: 600;
}
.page-btn:hover, .page-btn:focus {
    background: linear-gradient(90deg, var(--main-accent) 0%, var(--main-accent2) 100%);
    color: var(--main-text-light);
    box-shadow: 0 2px 8px #a5b4fc55, 0 4px 24px #34d39933;
    transform: scale(1.04);
}
.page-btn.current {
    background: linear-gradient(90deg, var(--main-accent) 0%, var(--main-accent2) 100%);
    color: var(--main-text-light);
    font-weight: bold;
    cursor: default;
    border: 2px solid #34d399cc;
    box-shadow: 0 4px 16px #34d39933, 0 0 0 2.5px #34d399cc inset;
}

button, .save-btn, .img-btn, .reject-btn, .download-btn, .page-btn {
    box-shadow: 0 2px 8px #e0e7ff33;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.1s;
    outline: none;
}
button:active, .save-btn:active, .img-btn:active, .reject-btn:active, .download-btn:active, .page-btn:active {
    transform: scale(0.97);
    box-shadow: 0 1px 4px #a5b4fc33;
}
button:focus, .save-btn:focus, .img-btn:focus, .reject-btn:focus, .download-btn:focus, .page-btn:focus {
    box-shadow: 0 0 0 2px #2563eb55;
}
button:focus-visible, .page-btn:focus-visible {
    outline: 2px solid #34d399;
    outline-offset: 2px;
}

input[type="text"], input[type="password"], textarea {
    border: 1.5px solid #c7d2fe;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 1rem;
    transition: border 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px #e0e7ff22;
    background: var(--main-input-bg);
    color: var(--main-input-text);
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
    border: 1.5px solid var(--main-accent);
    box-shadow: 0 0 0 2px #2563eb33;
}

::-webkit-scrollbar {
    width: 8px;
    background: var(--main-glass);
}
::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a5b4fc;
}

.modal, .alert, .popup, #qrcode-modal > div {
    background: var(--main-glass) !important;
    backdrop-filter: var(--main-blur);
    border-radius: var(--main-radius);
    box-shadow: var(--main-shadow);
    border: var(--main-border);
    padding: 24px 32px;
    color: #222;
    font-size: 1.08rem;
    z-index: 1000;
}

.admin-toolbar {
    display: flex;
    gap: 12px;
    margin: 18px 0 18px 0;
    align-items: center;
}
.admin-toolbar button {
    background: var(--main-accent);
    color: var(--main-text-light);
    border: none;
    border-radius: 6px;
    padding: 6px 18px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
}
.admin-toolbar button:hover { background: #1e40af; }
.save-btn { background: #22c55e; }
.save-btn:hover { background: #16a34a; }
.img-btn { background: #f59e42; }
.img-btn:hover { background: #d97706; }
.reject-btn { background: var(--main-danger); }
.reject-btn:hover { background: #b91c1c; }

body::after {
  content: '';
  position: fixed;
  left: 0; top: 0; width: 100vw; height: 100vh;
  z-index: -3;
  pointer-events: none;
  background: radial-gradient(ellipse at 60% 10%, #fff 0%, #e0e7ff 40%, #b6d0f7 100%);
  opacity: 0.85;
  filter: blur(48px) saturate(1.3);
}

@media (max-width: 1200px) {
    .soft-list {
        max-width: 98vw;
        gap: 18px 8px;
    }
    .soft-card {
        width: 19vw;
        max-width: 220px;
        min-width: 120px;
    }
}
@media (max-width: 900px) {
    main, .soft-list, .navbar, .nav-search-bar { max-width: 100% !important; width: 100% !important; }

    .soft-list { flex-direction: column; align-items: center; gap: 24px 0 !important; }
    .soft-card { width: 94% !important; max-width: 640px !important; min-width: 240px !important; height: auto !important; min-height: 180px !important; }
    .soft-title, .soft-desc, .soft-footer, .soft-size, .soft-download-count, .soft-visit-count { word-break: break-all; overflow-wrap: break-word; }
    .soft-img-wrap { height: clamp(160px, 40vw, 320px) !important; min-height: clamp(160px, 40vw, 320px) !important; max-height: clamp(200px, 50vw, 360px) !important; }
    .soft-img { max-width: 100% !important; height: auto !important; }
}
@media (max-width: 600px) {
    main, .soft-list, .navbar, .nav-search-bar { max-width: 100% !important; width: 100% !important; padding: 0 4vw !important; }
    .soft-card { width: 100% !important; max-width: 100% !important; min-width: 0 !important; height: auto !important; min-height: 160px !important; }
    .soft-title { font-size: 1rem !important; }
    .soft-desc { font-size: 0.9rem !important; -webkit-line-clamp: 3; line-clamp: 3; }
    .soft-footer { padding: 8px 10px 0 10px !important; }
    .soft-size, .soft-download-count, .soft-visit-count { font-size: 0.75rem !important; }
    .soft-img-wrap { height: clamp(140px, 38vw, 240px) !important; }
    .download-btn, .page-btn { font-size: 0.95rem !important; padding: 10px 0 !important; min-width: 60px; }
}
@media (max-width: 400px) {
    .soft-card { min-height: 140px !important; }
    .soft-title { font-size: 0.92rem !important; }
    .soft-desc { font-size: 0.82rem !important; }
    .download-btn { font-size: 0.88rem !important; }
}


@media (max-width: 900px) {
  #editor { min-width: 100vw !important; width: 100vw !important; min-height: 200px !important; padding: 8px 2vw !important; }
  .draggable-block { min-width: 60px !important; min-height: 30px !important; font-size: 1rem !important; }
}
@media (max-width: 600px) {
  #editor { min-width: 100vw !important; width: 100vw !important; min-height: 120px !important; padding: 8px 2vw !important; }
  .draggable-block { min-width: 40px !important; min-height: 20px !important; font-size: 0.95rem !important; }
}


.soft-title, .soft-desc, .soft-footer, .soft-size, .soft-download-count, .soft-visit-count, .draggable-block {
  word-break: break-all;
  overflow-wrap: break-word;
}
.soft-img, .draggable-block img {
  max-width: 100%;
  height: auto;
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root {
    --main-gradient: linear-gradient(135deg, #232946 0%, #16161a 100%);
    --main-glass: rgba(34,43,69,0.92);
    --main-blur: blur(18px);
    --main-shadow: 0 8px 32px #23294699;
    --main-border: 1.5px solid #232946cc;
    --main-accent: #7f9cf5;
    --main-accent2: #34d399;
    --main-danger: #f87171;
    --main-warning: #fbbf24;
    --main-success: #34d399;
    --main-dark: #16161a;
    --main-light: #232946;
    --main-text: #e0e7ff;
    --main-text-light: #fff;
    --main-muted: #a5b4fc;
  }
  body {
    color: var(--main-text);
  }
  .navbar, .soft-card, .modal, .alert, .popup, #qrcode-modal > div {
    background: var(--main-glass) !important;
    color: var(--main-text);
    border: var(--main-border);
  }
  .navbar .logo, .navbar .nav-links a {
    color: #7f9cf5;
  }
  .soft-card {
    background: linear-gradient(120deg, rgba(34,43,69,0.98) 60%, #232946 100%);
    border: 2.5px solid #3a4666cc;
  }
  .soft-card:hover {
    box-shadow: 0 24px 64px #7f9cf544, 0 8px 32px #34d39933, 0 0 0 2.5px #34d399cc inset;
    border: 2.5px solid #34d399cc;
  }
  .soft-img-wrap {
    background: linear-gradient(90deg, #232946 60%, #3a4666 100%);
  }
  .navbar {
    background: linear-gradient(90deg, #232946 60%, #3a4666 100%);
    border: 2.5px solid #3a4666cc;
  }
  footer {
    background: rgba(34,43,69,0.18) !important;
    backdrop-filter: blur(16px) saturate(1.2);
    border: 2.5px solid #3a4666cc;
  }
  .page-btn {
    background: linear-gradient(90deg, #232946 60%, #3a4666 100%);
    border: 2px solid #3a4666cc;
  }
  .page-btn.current {
    box-shadow: 0 4px 16px #7f9cf533, 0 0 0 2.5px #34d399cc inset;
    border: 2px solid #34d399cc;
  }
}

body::after {
  background: radial-gradient(ellipse at 60% 10%, #fff 0%, #e0e7ff 40%, #b6d0f7 100%);
  opacity: 0.85;
  filter: blur(48px) saturate(1.3);
}

#season-bg {
  transition: background-image 0.8s, opacity 0.8s !important;
}

.footer-fixed {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  text-align: center;
  color: #888;
  font-size: 1rem;
  z-index: 100;
  padding: 14px 0 10px 0;
  margin: 0;
  line-height: 1.8;
}
.footer-fixed .footer-divider {
  color: #bbb;
  margin: 0 4px;
}

#qrcode-modal > div {
    background: rgba(255,255,255,0.85) !important;
    box-shadow: 0 2px 16px #0002;
    border-radius: 10px;
}
.dark-theme #qrcode-modal > div {
    background: rgba(34,43,69,0.85) !important;
}