/* 收藏统计样式 */
.collection-stats {
    display: flex;
    justify-content: space-around;
    background-color: #fff;
    border-radius: 12px;
    padding: 16px;
    margin: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stats-label {
    font-size: 14px;
    color: #8A8A8E;
    margin-bottom: 4px;
}

.stats-number {
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

/* 收藏组 (用于收藏夹和未分类藏品) */
.collection-group {
    margin: 16px;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.group-title {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.add-button {
    background-color: transparent;
    color: #007AFF;
    border: none;
    padding: 8px 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

/* 收藏夹列表项 */
.folder-item {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 10px;
    padding: 12px; /* Consistent with collection-item */
    margin-bottom: 12px; /* Consistent with collection-item */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    cursor: pointer; 
}

.folder-icon-placeholder {
    width: 80px; /* Match collection-image */
    height: 80px; /* Match collection-image */
    margin-right: 12px; /* Consistent with collection-image */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0; /* Placeholder background */
    border-radius: 8px; /* Consistent with collection-image */
    flex-shrink: 0;
}

.folder-icon-placeholder svg {
    width: 36px; /* Adjust icon size within the larger placeholder if needed */
    height: 36px;
    fill: #8A8A8E;
}

.folder-info {
    flex-grow: 1;
    min-width: 0; /* Prevent text overflow issues */
}

.folder-name {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-count {
    font-size: 13px;
    color: #8A8A8E;
    margin: 0;
}

.section-divider {
    border: none;
    border-top: 0.5px solid #E5E5EA; 
    margin: 16px 0; 
}

/* 单个藏品列表项 (Applies to unclassified and items within folder view) */
.collection-list { /* Parent for .collection-item */
    margin: 0; 
}

.collection-item {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden; /* Important for child elements like image */
    margin-bottom: 12px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.collection-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden; /* Ensure image is clipped to border-radius */
}

.collection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.collection-info {
    flex-grow: 1;
    min-width: 0; /* Prevent text overflow issues with flex children */
}

.collection-title {
    font-size: 17px;
    font-weight: 600;
    color: #000;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-period {
    font-size: 13px;
    color: #8A8A8E;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-price {
    font-size: 15px;
    color: #34C759;
    font-weight: 500;
    white-space: nowrap; /* Keep price on one line */
    overflow: hidden;
    text-overflow: ellipsis;
}

.options-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #8A8A8E;
    margin-left: auto; /* Pushes it to the right */
    flex-shrink: 0;
}

.options-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: #F2F2F7;
    padding: 20px;
    border-radius: 14px;
    width: 270px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #000;
}

#new-folder-name {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #D1D1D6;
    border-radius: 8px;
    font-size: 15px;
    background-color: #fff;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #D1D1D6;
    margin: 0 -20px -20px -20px;
}

.modal-button {
    flex-grow: 1;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 17px;
    cursor: pointer;
    color: #007AFF;
}

.modal-button:first-child {
    border-right: 1px solid #D1D1D6;
}
.modal-button-secondary {
     color: #007AFF;
     font-weight: normal; 
}
#confirm-add-folder {
    font-weight: 600; 
}


/* 动作表单样式 - 重新修改，确保正确显示 */
.action-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1050;
    /* 默认隐藏，JS控制显示 */
    display: none; 
}

/* 直接控制显示，不使用CSS transition */
.action-sheet-overlay.visible {
    display: flex !important;
}

.action-sheet-content {
    width: 94%;
    max-width: 500px; 
    background-color: transparent;
    margin-bottom: 8px;
}

#action-sheet-header {
    background-color: #f9f9f9;
    border-radius: 13px 13px 0 0; 
    padding: 12px 16px 8px;
    text-align: center;
}

#action-sheet-title {
    font-size: 13px; 
    font-weight: 400; 
    color: #8A8A8E; 
    margin: 0;
    line-height: 1.2;
}

#action-sheet-prompt {
    font-size: 13px;
    color: #8A8A8E;
    margin-top: 4px;
    line-height: 1.2;
}

#action-sheet-options {
    background-color: #f9f9f9;
    border-radius: 0 0 13px 13px; 
    overflow: hidden; 
}

.action-sheet-button {
    display: block;
    width: 100%;
    background-color: transparent; 
    border: none;
    border-top: 0.5px solid rgba(60, 60, 67, 0.29); 
    padding: 16px; 
    font-size: 17px; 
    color: #007AFF; 
    text-align: center;
    cursor: pointer;
    line-height: 1.25;
}

#action-sheet-options .action-sheet-button:first-child {
    border-top: none; 
}

.action-sheet-button.destructive {
    color: #FF3B30; 
}

.action-sheet-cancel-button {
    background-color: #f9f9f9; 
    border-radius: 13px; 
    font-weight: 600; 
    color: #007AFF; 
    border-top: none !important; 
    margin-top: 8px;
}

.action-sheet-folder-list {
    max-height: 200px; 
    overflow-y: auto;
}

.action-sheet-folder-item { 
    display: block;
    width: 100%;
    background-color: transparent;
    border: none;
    border-top: 0.5px solid rgba(60, 60, 67, 0.29);
    padding: 16px;
    font-size: 17px;
    color: #007AFF;
    text-align: center;
    cursor: pointer;
    line-height: 1.25;
}

.action-sheet-folder-list .action-sheet-folder-item:first-child {
    border-top: none;
}


/* --- 统一导航栏样式 --- */
.nav-bar {
    display: flex;
    align-items: center;
    height: 44px; 
    padding: 0 10px; 
    background-color: #F7F7F7; 
    border-bottom: 0.5px solid #D1D1D6; 
    box-sizing: border-box;
    position: relative; 
}

.nav-back-button { 
    background: none;
    border: none;
    color: #007AFF;
    font-size: 17px;
    cursor: pointer;
    padding: 0; 
    display: flex; 
    align-items: center;
    line-height: 1;
    flex-shrink: 0; 
}

.nav-back-button::before { 
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-left: 2px solid #007AFF;
    border-bottom: 2px solid #007AFF;
    transform: rotate(45deg);
    margin-right: 5px; 
}

#nav-main-title {
    flex-grow: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    color: #000;
    line-height: 44px; 
}

.nav-folder-title-view { 
    flex-grow: 1;      
    text-align: center; 
    font-size: 17px;
    font-weight: 600;
    color: #000;
    line-height: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-placeholder-right {
    flex-shrink: 0; 
}

.folder-view-nav-bar, 
#folder-view-title:not(.nav-folder-title-view) { 
    display: none !important; 
}