/* ===== 强制重置（隔离旧主题样式） ===== */
#gallery-autumn-app img,
#gallery-other-app img,
#gallery-autumn-app video,
#gallery-other-app video {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: cover !important;
    border-radius: inherit !important;
    box-shadow: none !important;
}

/* 公共组件：灯箱、面板、弹窗、Toast、骨架屏 */
.lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
}
.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    padding: 0.5rem;
    border-radius: 50%;
}
.lightbox-close { top: 20px; right: 30px; }
.lightbox-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 20px; top: 50%; transform: translateY(-50%); }

/* 齿轮面板 */
.gear-panel {
    position: fixed;
    top: 0; right: 0;
    width: 320px; height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    z-index: 10010;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: block;
}
.gear-panel.open { transform: translateX(0); }
.panel-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10005;
    display: none;
}
.panel-overlay.open { display: block; }
.gear-panel-buttons button {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    background: #f0f0f0;
    cursor: pointer;
}
.gear-panel-buttons button:hover { background: #e0e0e0; }

/* 密码弹窗 / 编辑弹窗 */
.password-modal,
.edit-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10020;
    display: none;
    align-items: center;
    justify-content: center;
}
.password-modal.open,
.edit-modal.open { display: flex; }
.password-modal-content,
.edit-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 320px;
    text-align: center;
}
.edit-modal-content textarea {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
}
.edit-modal-content input {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
}

/* 骨架屏 */
.skeleton-grid {
    display: grid;
    gap: 1.5rem;
}
.skeleton-item {
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 12px;
    height: 250px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@media (min-width: 1024px) { .skeleton-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 768px) and (max-width: 1023px) { .skeleton-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 767px) { .skeleton-grid { grid-template-columns: 1fr; } }

/* 齿轮图标 */
.gear-icon {
    position: fixed;
    top: 100px; right: 20px;
    font-size: 28px;
    cursor: pointer;
    z-index: 999;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Toast 提示 */
.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    z-index: 10030;
    font-size: 14px;
    animation: fadeOut 2.5s forwards;
}
.toast-message.success { background: #4caf50; }
.toast-message.error   { background: #f44336; }
.toast-message.info    { background: #333; }

@keyframes fadeOut {
    0%   { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

/* 拖拽状态 */
.drag-over { opacity: 0.6; transform: scale(0.98); }
.other-card.selected { outline: 3px solid #007cba; outline-offset: -3px; }
