:root {
    /* 颜色变量 */
    --primary-color: #07c160;
    --primary-dark: #06b054;
    --text-color: #333;
    --text-secondary: #666;
    --text-light: #999;
    --border-color: #eee;
    --background-color: #f9f9f9;
    --background-light: #f8f9fa;
    
    /* 阴影变量 */
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-primary: rgba(7, 193, 96, 0.2);
    --shadow-primary-hover: rgba(7, 193, 96, 0.3);
    
    /* 功能颜色 */
    --error-color: #c62828;
    --error-bg: #ffebee;
    --debug-color: #004d40;
    --debug-bg: #e0f2f1;
    
    /* 贴膜颜色 */
    --film-green: #07c160;
    --film-purple: #8a2be2;
    --film-red: #ff0000;
    --film-black: #000000;
    --film-blue: #007bff;
    
    /* 边角半径 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    
    /* 字体大小 */
    --font-sm: 0.875rem;  /* 14px */
    --font-base: 1rem;    /* 16px */
    --font-lg: 1.125rem;  /* 18px */
    --font-xl: 1.25rem;   /* 20px */
    --font-2xl: 1.5rem;   /* 24px */
    --font-3xl: 1.75rem;  /* 28px */
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
}

.container {
    max-width: 750px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding-bottom: 60px;
}

/* Typography */
.app-title {
    font-size: var(--font-3xl);
    font-weight: bold;
    text-align: center;
    margin: 0 auto 5px;
    padding: 5px 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-title span:first-child {
    color: #53c96b;
    background: linear-gradient(45deg, #53c96b, #7edc8a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

/* Card and Container Styles */
.search-section {
    padding: 12px 20px 15px;
    margin-top: -5px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px var(--shadow-color);
    margin-bottom: var(--spacing-lg);
}

.search-box {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    background: #fff;
    padding: 3px;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-box form {
    display: flex;
    gap: var(--spacing-sm);
    width: 100%;
}

/* Input Styles */
.search-box input {
    flex: 1;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: var(--font-base);
    outline: none;
    background: transparent;
    color: var(--text-color);
    box-sizing: border-box;
    min-width: 0;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.search-box input:focus {
    background: var(--background-light);
}

.search-box input::placeholder {
    color: var(--text-light);
    font-size: 15px;
}

/* Button Styles */
/* 主要按钮样式 */
.search-box button,
.save-btn,
.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px var(--shadow-primary);
    -webkit-tap-highlight-color: transparent;
}

.search-box button {
    padding: 0 24px;
    font-size: 15px;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover,
.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px var(--shadow-primary-hover);
    background: var(--primary-dark);
}

.search-box button:active,
.primary-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px var(--shadow-primary);
}

/* 次级按钮样式 */
.cancel-btn,
.secondary-btn {
    background: #f5f5f5;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
}

/* Results Display */
.search-results {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
}

/* 搜索结果和数据项共用样式 */
.data-item {
    background: white;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px var(--shadow-light);
    position: relative;
}

/* 分隔线样式 - 使用伪元素确保正确显示 */
.data-item:not(.last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 1px;
    border-bottom: 1px dashed #e0e0e0;
}

.data-model {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 5px;
}

.data-location {
    color: #FFA500;
    font-size: 30px;
    font-weight: bold;
    margin: 8px 0;
}

.data-code {
    color: var(--text-secondary);
    font-size: 20px;
}

/* Film Code Styles */
.film-code-container {
    margin-left: 15px;
    display: inline-block;
}

.film-code-container .g-film-code,
.film-code-container .w-film-code,
.film-code-container .n-film-code,
.film-code-container .d-film-code,
.film-code-container .new-shelf-code {
    margin-left: 0;
}

/* 贴膜码基础样式 */
.g-film-code,
.w-film-code,
.n-film-code,
.d-film-code,
.new-shelf-code {
    font-size: var(--font-3xl);
    font-weight: bold;
    margin-left: 15px;
    display: inline-block;
}

/* 各类贴膜码颜色 */
.g-film-code {
    color: var(--film-green);
}

.w-film-code {
    color: var(--film-purple);
    margin-left: 0;
}

.d-film-code {
    color: var(--film-black);
}

.n-film-code {
    color: var(--film-red);
}

.new-shelf-code {
    color: var(--film-blue);
}

.normal-film-code {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    margin-left: 15px;
    display: inline-block;
}

/* Navigation Elements */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 7px 0;
    box-shadow: 0 -2px 5px var(--shadow-light);
    height: 52px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    cursor: pointer;
}

.nav-icon {
    width: 26px;
    height: 26px;
    margin-bottom: 3px;
}

.nav-item span {
    font-size: 13.5px;
}

/* 切换按钮旋转动画 */
.nav-item.rotate-cw .nav-icon {
    animation: rotateCW 0.5s ease-in-out forwards;
}

.nav-item.rotate-ccw .nav-icon {
    animation: rotateCCW 0.5s ease-in-out forwards;
}

@keyframes rotateCW {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotateCCW {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

/* 数据库状态文字切换动画 */
#dbHint {
    display: inline-block;
    transition: opacity 0.15s ease;
}

#dbHint.db-hint-pop {
    animation: hintPop 0.35s ease-out forwards;
}

@keyframes hintPop {
    0%   { opacity: 0; transform: scale(0.6) translateY(-4px); }
    60%  { opacity: 1; transform: scale(1.08) translateY(0); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.modal, .edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 15px;
    border-radius: 10px;
    width: 85%;
    max-width: 380px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 15px;
    text-align: center;
    color: var(--text-color);
}

/* Database Selector */
.db-list {
    margin-bottom: 20px;
}

.db-item {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.db-item:last-child {
    border-bottom: none;
}

.db-status {
    color: var(--primary-color);
    font-size: var(--font-sm);
}

.modal-actions {
    text-align: center;
}

/* Status Messages */
.error-message {
    background: var(--error-bg);
    color: var(--error-color);
    padding: 12px;
    margin: 10px 16px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 500;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.debug-info {
    background: var(--debug-bg);
    color: var(--debug-color);
    padding: 8px 12px;
    margin: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: none;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.db-hint {
    font-size: 14px;
    margin-left: 10px;
    font-weight: bold;
    display: inline-block;
    vertical-align: middle;
    color: #FFA500;
    -webkit-text-fill-color: #FFA500;
    text-fill-color: #FFA500;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background-color: rgba(255, 165, 0, 0.1);
}

h1.app-title .db-hint {
    color: #FFA500 !important;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Management Page Elements */
.manage-header,
.back-header {
    background: white;
    padding: 15px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px var(--shadow-light);
    justify-content: center;
}

.manage-header {
    gap: 10px;
}

.back-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 12px 16px 12px 14px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    z-index: 101;
    min-width: 44px;
    min-height: 44px;
}

.back-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.back-btn:active {
    background-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-50%) scale(0.98);
}

.back-btn::before {
    content: '';
    width: 24px;
    height: 24px;
    margin-right: 6px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.back-header {
    background: #fff;
    padding: 0 16px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    justify-content: center;
    height: 56px;
}

.back-header h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    text-align: center;
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    line-height: 56px;
    pointer-events: none;
    color: #1a1a1a;
    letter-spacing: 1px;
}

.header-icon-btn {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
    position: relative;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
}

.header-icon-btn:active {
    background: rgba(0,0,0,0.06);
}

.manage-search-bar {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
    gap: 8px;
}

.manage-search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    padding: 8px 0;
    background: transparent;
}

.search-close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}

.search-close-btn:active {
    color: #333;
}

.data-list {
    padding: 10px 12px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    font-weight: bold;
}

.secondary-btn {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 15px;
    border-radius: var(--radius-sm);
}

/* 底部导航和操作栏共用样式 */
.manage-footer,
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.manage-footer {
    padding: 15px;
    display: flex;
    gap: 10px;
    background: transparent;
    box-shadow: none;
}

.manage-footer .primary-btn,
.manage-footer .secondary-btn {
    flex: 1;
    padding: 12px;
    font-size: 16px;
}

/* 导出数据按钮特殊样式 */
#exportBtn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 2px 6px var(--shadow-primary);
}

#exportBtn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px var(--shadow-primary-hover);
}

#exportBtn:active {
    background-color: var(--primary-dark);
    transform: translateY(1px);
    box-shadow: 0 2px 4px var(--shadow-primary);
}

/* Form Elements */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.save-btn {
    padding: 8px 15px;
    border-radius: var(--radius-sm);
}

/* Help Styles */
.help-content {
    margin-bottom: 12px;
    line-height: 1.4;
    font-size: 14px;
}

.help-content p {
    margin: 8px 0 4px 0;
    font-weight: bold;
}

.help-content ul {
    padding-left: 18px;
    margin: 4px 0;
}

.help-content li {
    margin-bottom: 4px;
}

/* 帮助信息颜色样式 */
.help-highlight {
    color: var(--film-purple);
    font-weight: bold;
}

.help-green {
    color: var(--film-green);
    font-weight: bold;
}

.help-orange {
    color: #FFA500;
    font-weight: bold;
}

.help-black {
    color: var(--film-black);
    font-weight: bold;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}

/* 添加加载指示器样式 */
.loading-indicator {
    padding: 15px;
    text-align: center;
    color: var(--text-secondary);
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.loading-indicator::before {
    content: "";
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid #eee;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 375px) {
    /* 搜索区域 */
    .search-section {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .search-box {
        padding: 2px;
        gap: 6px;
    }
    
    .search-box form {
        display: flex;
        gap: 6px;
        width: 100%;
    }
    
    .search-box input {
        font-size: 15px;
        padding: 10px 14px;
    }
    
    .search-box button {
        padding: 0 20px;
        font-size: 14px;
        min-width: 70px;
    }
    
    /* 搜索结果和数据项 */
    .data-item {
        padding: 10px;
    }
    
    .data-model {
        font-size: 14px;
    }
    
    .data-location {
        font-size: 24px;
    }
    
    .data-code {
        font-size: 12px;
    }

    /* 管理页面 */
    .manage-header, .back-header {
        padding: 15px;
        height: 60px;
    }
    
    .back-header h1 {
        font-size: 20px;
        line-height: 60px;
    }
    
    .back-btn {
        padding: 8px 12px 8px 10px;
    }
    
    .primary-btn, .secondary-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .modal-content {
        padding: 15px;
        width: 90%;
        max-width: 500px;
    }
    
    .form-group input {
        font-size: 13px;
    }
}

/* Safe Area Insets */
@supports (padding-top: env(safe-area-inset-top)) {
    .search-section {
        padding-top: calc(12px + env(safe-area-inset-top));
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
    
    .manage-footer {
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
    }
}

/* 数据信息样式 */
.data-info {
    background: var(--background-light);
    color: var(--text-secondary);
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: var(--radius-md);
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

/* 固定位置数据信息样式 */
.fixed-data-info {
    position: fixed;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
    color: var(--text-secondary);
    padding: 10px 15px;
    border-radius: var(--radius-md);
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    width: auto;
    max-width: 80%;
    display: none;
}

/* 数据底部布局 */
.data-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

/* 展开按钮样式 */
.expand-btn {
    color: var(--primary-color);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.expand-btn:hover {
    opacity: 0.8;
}

/* 关联型号区域样式 */
.related-models {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e0e0e0;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.related-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.related-item {
    padding: 6px 10px;
    background: var(--background-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-align: center;
}

.related-model {
    color: var(--text-color);
    font-weight: 500;
}

/* 密码验证页面样式 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 20px;
}

.auth-box {
    background: white;
    padding: 48px 32px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 340px;
    text-align: center;
}

.auth-box h2 {
    margin: 0 0 32px;
    color: #333;
    font-size: 22px;
    font-weight: 600;
}

.auth-box input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 20px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.auth-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
}

.auth-box button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.auth-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.3);
}

.auth-error {
    color: #ff4444;
    margin-top: 16px;
    font-size: 14px;
    min-height: 20px;
}

/* 展开状态样式 */
.data-item.expanded {
    background: #f5f5f5;
}

/* 数据项操作按钮 */
.data-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

.edit-btn, .delete-btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 13px;
    -webkit-tap-highlight-color: transparent;
}

.edit-btn {
    background: var(--primary-color);
    color: white;
}

.edit-btn:hover {
    background: var(--primary-dark);
}

.delete-btn {
    background: #ff4444;
    color: white;
}

.delete-btn:hover {
    background: #cc0000;
}

/* 回收站徽章 */
.badge {
    background: #ff4444;
    color: white;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    margin-left: 4px;
    vertical-align: middle;
}

/* 回收站列表 */
.recycle-list {
    margin-top: 12px;
}

.recycle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.recycle-item:last-child {
    border-bottom: none;
}

.recycle-info {
    flex: 1;
    overflow: hidden;
}

.recycle-model {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recycle-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recycle-from {
    color: var(--text-light);
    font-size: 11px;
}

.recycle-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 10px;
}

/* 小按钮 */
.btn.small,
.secondary-btn.small,
.edit-btn.small,
.delete-btn.small,
.cancel-btn.small {
    padding: 4px 10px;
    font-size: 12px;
}

/* 危险按钮 */
.cancel-btn.danger {
    background: #ff4444;
    color: white;
    border: none;
}

.cancel-btn.danger:hover {
    background: #cc0000;
}

/* ==================== 数据管理页面专用样式 ==================== */

/* 页面背景 */
#mainPage {
    background: #f0f2f5;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* 数据卡片 */
.manage-card {
    background: #fff;
    border-radius: 14px;
    margin: 0 12px 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border-left: 4px solid var(--primary-color);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    overflow: hidden;
}

.manage-card:active {
    transform: scale(0.99);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.manage-card-body {
    padding: 14px 16px;
}

.manage-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.manage-card-model {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manage-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
}

.manage-card-detail {
    margin-top: 8px;
    gap: 10px;
}

.manage-card-location {
    font-size: 22px;
    font-weight: 700;
    color: #FF8C00;
    letter-spacing: 0.5px;
}

/* 管理页面贴膜码字号稍小 */
#mainPage .g-film-code,
#mainPage .w-film-code,
#mainPage .n-film-code,
#mainPage .d-film-code,
#mainPage .new-shelf-code {
    font-size: 22px;
    margin-left: 10px;
}

#mainPage .film-code-container {
    margin-left: 10px;
}

.manage-card-code {
    font-size: 14px;
    color: #888;
    margin-top: 4px;
    font-weight: 500;
}

/* 图标按钮 */
.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    background: transparent;
}

.icon-btn-edit {
    color: var(--primary-color);
}

.icon-btn-edit:hover,
.icon-btn-edit:active {
    background: rgba(7, 193, 96, 0.1);
}

.icon-btn-delete {
    color: #ccc;
}

.icon-btn-delete:hover,
.icon-btn-delete:active {
    background: rgba(255, 68, 68, 0.08);
    color: #ff4444;
}

/* 底部操作栏 */
.manage-footer {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.manage-footer .secondary-btn {
    flex: 1;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    background: #fff;
    transition: all 0.2s ease;
}

.manage-footer .secondary-btn:active {
    background: rgba(7, 193, 96, 0.08);
    transform: scale(0.98);
}

.manage-footer .primary-btn {
    flex: 1;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.25);
    transition: all 0.2s ease;
}

.manage-footer .primary-btn:active {
    background: var(--primary-dark);
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(7, 193, 96, 0.2);
}

/* 弹窗增强 */
#mainPage .modal-content {
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

#mainPage .modal-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
}

#mainPage .form-group {
    margin-bottom: 18px;
}

#mainPage .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

#mainPage .form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e8e8e8;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #fafafa;
}

#mainPage .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(7, 193, 96, 0.1);
}

#mainPage .modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

#mainPage .modal-actions .cancel-btn,
#mainPage .modal-actions .primary-btn {
    flex: 1;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
}

#mainPage .modal-actions .cancel-btn {
    background: #f5f5f5;
    color: #666;
    border: none;
}

#mainPage .modal-actions .primary-btn {
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.25);
}

/* 回收站弹窗 */
#recycleModal .modal-content {
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

#recycleModal .recycle-item {
    padding: 14px 0;
}

#recycleModal .recycle-model {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

/* 数据管理页面的空数据提示 */
#mainPage .no-results {
    text-align: center;
    padding: 60px 20px;
    color: #bbb;
    font-style: normal;
    font-size: 15px;
}

.load-more-hint {
    text-align: center;
    padding: 16px 20px;
    color: #bbb;
    font-size: 13px;
}

#mainPage .error-message {
    border-radius: 12px;
}

/* 数据库选择弹窗 */
#dbSelectModal .db-item {
    padding: 14px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
    border-bottom: none;
    background: #f8f8f8;
}

#dbSelectModal .db-item:active {
    background: #f0f0f0;
}

.manage-card-highlight {
    animation: cardFlash 1.5s ease;
}

@keyframes cardFlash {
    0%, 100% { background: #fff; }
    20% { background: #e8f8ee; }
    40% { background: #d0f0dd; }
    60% { background: #e8f8ee; }
    80% { background: #d0f0dd; }
}