/**
 * family-album.css — 问智家庭相册样式 v1
 * 浅色/深色模式全适配
 * 配色继承全站设计系统（主色 #4f46e5）
 */

/* ==================== 变量 ==================== */

.album-root {
    --album-primary: #4f46e5;
    --album-primary-light: rgba(79, 70, 229, 0.12);
    --album-primary-dark: #4338ca;
    --album-radius: 12px;
    --album-radius-sm: 8px;
    --album-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 浅色模式 */
[data-theme="light"] .album-root,
.album-root {
    --album-bg: #f8fafc;
    --album-card-bg: #ffffff;
    --album-text: #1e293b;
    --album-text-secondary: #64748b;
    --album-text-tertiary: #94a3b8;
    --album-border: #e2e8f0;
    --album-overlay-bg: rgba(0, 0, 0, 0.6);
    --album-search-bg: #ffffff;
    --album-search-border: #e2e8f0;
    --album-tab-bg: #f1f5f9;
    --album-tab-active-bg: var(--album-primary);
    --album-tab-active-text: #ffffff;
    --album-upload-bg: var(--album-primary);
    --album-upload-text: #ffffff;
    --album-footer-bg: #f8fafc;
}

/* 深色模式 */
[data-theme="dark"] .album-root {
    --album-bg: #0f172a;
    --album-card-bg: #1e293b;
    --album-text: #e2e8f0;
    --album-text-secondary: #94a3b8;
    --album-text-tertiary: #64748b;
    --album-border: #334155;
    --album-overlay-bg: rgba(0, 0, 0, 0.8);
    --album-search-bg: #1e293b;
    --album-search-border: #334155;
    --album-tab-bg: #1e293b;
    --album-tab-active-bg: var(--album-primary);
    --album-tab-active-text: #ffffff;
    --album-upload-bg: var(--album-primary);
    --album-upload-text: #ffffff;
    --album-footer-bg: #0f172a;
}

/* ==================== 布局 ==================== */

.album-root {
    padding: 20px;
    
    margin: 0 auto;
}

/* ==================== 顶部工具栏 ==================== */

.album-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.album-search-wrap {
    flex: 1;
}

/* AI 搜索栏（继承 Smart Bar 设计） */
.album-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--album-search-bg);
    border: 2px solid var(--album-search-border);
    border-radius: 28px;
    transition: var(--album-transition);
}

.album-search-bar:focus-within {
    border-color: var(--album-primary);
    box-shadow: 0 0 0 4px var(--album-primary-light);
}

.album-search-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: album-breath 3.5s ease-in-out infinite;
}

@keyframes album-breath {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.album-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: var(--album-text);
    min-width: 0;
}

.album-search-input::placeholder {
    color: var(--album-text-tertiary);
}

.album-search-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--album-primary) !important;
    color: #fff !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--album-transition);
}

.album-search-btn:hover {
    background: var(--album-primary-dark) !important;
    transform: scale(1.05);
}

.album-search-btn svg {
    fill: #fff !important;
    stroke: #fff !important;
}

/* 上传按钮 */
.album-upload-trigger {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 28px;
    background: var(--album-upload-bg) !important;
    color: var(--album-upload-text) !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--album-transition);
    white-space: nowrap;
}

.album-upload-trigger:hover {
    background: var(--album-primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--album-primary-light);
}

/* ==================== Tab 切换 ==================== */

.album-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.album-tabs::-webkit-scrollbar { display: none; }

.album-tab {
    flex-shrink: 0;
    padding: 8px 18px;
    border: none;
    border-radius: 20px;
    background: var(--album-tab-bg) !important;
    color: var(--album-text-secondary) !important;
    font-size: 14px;
    cursor: pointer;
    transition: var(--album-transition);
}

.album-tab.active {
    background: var(--album-tab-active-bg) !important;
    color: var(--album-tab-active-text) !important;
    font-weight: 600;
}

/* ==================== 瀑布流 ==================== */

.album-grid {
    column-count: 4;
    column-gap: 16px;
}

@media (max-width: 1200px) { .album-grid { column-count: 3; } }
@media (max-width: 768px) { .album-grid { column-count: 2; } }
@media (max-width: 480px) { .album-grid { column-count: 1; } }

.album-card {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: var(--album-radius);
    overflow: hidden;
    background: var(--album-card-bg);
    border: 1px solid var(--album-border);
    cursor: pointer;
    transition: var(--album-transition);
}

.album-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.album-card-img-wrap {
    position: relative;
    overflow: hidden;
    min-height: 120px;
    background: var(--album-tab-bg);
}

.album-card-img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.album-card:hover .album-card-img {
    transform: scale(1.05);
}

.album-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
}

.album-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 10px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.album-card:hover .album-card-overlay {
    opacity: 1;
}

.album-card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.album-photo-tag {
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 11px;
    backdrop-filter: blur(4px);
}

.album-card-members {
    display: flex;
    gap: 4px;
}

.album-photo-member {
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--album-primary);
    color: #fff;
    font-size: 11px;
}

.album-card-info {
    padding: 10px 12px;
}

.album-card-desc {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--album-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.album-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.album-card-date {
    font-size: 12px;
    color: var(--album-text-tertiary);
}

.album-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 8px;
    background: var(--album-primary-light);
    color: var(--album-primary);
    font-size: 10px;
    font-weight: 500;
}

/* ==================== 时间线 ==================== */

.album-timeline {
    position: relative;
    padding-left: 24px;
}

.album-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--album-border);
}

.album-timeline-group {
    margin-bottom: 32px;
}

.album-timeline-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    position: relative;
}

.album-timeline-dot {
    position: absolute;
    left: -21px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--album-primary);
    border: 3px solid var(--album-bg);
    box-shadow: 0 0 0 2px var(--album-primary);
}

.album-timeline-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--album-text);
}

.album-timeline-count {
    font-size: 13px;
    color: var(--album-text-tertiary);
}

.album-timeline-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.album-timeline-photos .album-card {
    margin-bottom: 0;
}

/* ==================== 分类视图 ==================== */

.album-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.album-category-card {
    border-radius: var(--album-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--album-transition);
    aspect-ratio: 4/3;
    position: relative;
}

.album-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.album-category-cover {
    width: 100%;
    height: 100%;
    position: relative;
}

.album-category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-category-cover svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.album-category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.album-category-overlay h4 {
    margin: 0 0 2px;
    color: #fff;
    font-size: 16px;
}

.album-category-overlay span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

/* ==================== 人物视图 ==================== */

.album-persons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.album-person-card {
    text-align: center;
    padding: 24px 16px;
    border-radius: var(--album-radius);
    background: var(--album-card-bg);
    border: 1px solid var(--album-border);
    cursor: pointer;
    transition: var(--album-transition);
}

.album-person-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--album-primary);
}

.album-person-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--album-primary-light);
    color: var(--album-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    margin: 0 auto 12px;
}

.album-person-card h4 {
    margin: 0 0 4px;
    font-size: 15px;
    color: var(--album-text);
}

.album-person-relation {
    display: block;
    font-size: 12px;
    color: var(--album-text-tertiary);
    margin-bottom: 4px;
}

.album-person-count {
    font-size: 13px;
    color: var(--album-primary);
    font-weight: 500;
}

/* ==================== 成长纪念馆 ==================== */

.album-growth-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.album-growth-tab {
    padding: 6px 16px;
    border: 1px solid var(--album-border);
    border-radius: 18px;
    background: transparent !important;
    color: var(--album-text-secondary) !important;
    font-size: 13px;
    cursor: pointer;
    transition: var(--album-transition);
}

.album-growth-tab.active {
    background: var(--album-primary) !important;
    color: #fff !important;
    border-color: var(--album-primary);
}

.album-growth-info {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    background: var(--album-card-bg);
    border-radius: var(--album-radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--album-text-secondary);
}

.album-growth-info span:first-child {
    font-weight: 600;
    color: var(--album-text);
    font-size: 16px;
}

.album-onthisday-banner {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--album-primary-light);
    border-radius: var(--album-radius);
    border-left: 4px solid var(--album-primary);
}

.album-onthisday-banner h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    color: var(--album-primary);
    font-size: 14px;
}

.album-onthisday-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
}

.album-onthisday-item {
    flex-shrink: 0;
    text-align: center;
}

.album-onthisday-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--album-radius-sm);
    margin-bottom: 4px;
}

.album-onthisday-item span {
    font-size: 11px;
    color: var(--album-text-tertiary);
}

.album-growth-stages {
    position: relative;
    padding-left: 20px;
}

.album-growth-stages::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--album-border);
}

.album-growth-stage {
    margin-bottom: 28px;
    position: relative;
}

.album-growth-stage-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.album-growth-dot {
    position: absolute;
    left: -17px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--album-primary);
    border: 2px solid var(--album-bg);
}

.album-growth-stage-header h4 {
    margin: 0;
    font-size: 15px;
    color: var(--album-text);
}

.album-growth-stage-header span {
    font-size: 12px;
    color: var(--album-text-tertiary);
}

.album-growth-stage-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

/* ==================== 照片详情弹窗 ==================== */

.album-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.album-detail-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--album-overlay-bg);
    backdrop-filter: blur(8px);
}

.album-detail-modal {
    position: relative;
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    background: var(--album-card-bg);
    border-radius: var(--album-radius);
    overflow: hidden;
    display: flex;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .album-detail-modal {
        flex-direction: column;
        width: 95%;
        max-height: 85vh;
    }
}

.album-detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--album-transition);
}

.album-detail-close:hover {
    background: rgba(0, 0, 0, 0.7) !important;
}

.album-detail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4) !important;
    color: #fff !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--album-transition);
}

.album-detail-nav:hover {
    background: rgba(0, 0, 0, 0.6) !important;
}

.album-detail-nav.prev { left: 12px; }
.album-detail-nav.next { right: 12px; }

.album-detail-body {
    display: flex;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .album-detail-body { flex-direction: column; }
}

.album-detail-img-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    min-height: 300px;
}

.album-detail-img-wrap img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.album-detail-placeholder {
    color: var(--album-text-tertiary);
}

.album-detail-panel {
    width: 320px;
    flex-shrink: 0;
    padding: 24px;
    overflow-y: auto;
    background: var(--album-card-bg);
}

@media (max-width: 768px) {
    .album-detail-panel {
        width: 100%;
        max-height: 40vh;
    }
}

.album-detail-section {
    margin-bottom: 20px;
}

.album-detail-section h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--album-text);
}

.album-detail-section label {
    display: block;
    font-size: 12px;
    color: var(--album-text-tertiary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.album-detail-section p {
    margin: 0;
    font-size: 14px;
    color: var(--album-text-secondary);
}

.album-detail-tags,
.album-detail-members {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.album-detail-tag,
.album-detail-member {
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--album-primary-light);
    color: var(--album-primary);
    font-size: 12px;
}

.album-detail-member {
    background: var(--album-primary);
    color: #fff;
}

.album-detail-no-tag {
    font-size: 13px;
    color: var(--album-text-tertiary);
}

.album-detail-fileinfo {
    font-size: 13px !important;
    color: var(--album-text-tertiary) !important;
}

.album-detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--album-border);
}

.album-detail-action {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border: 1px solid var(--album-border);
    border-radius: 20px;
    background: transparent !important;
    color: var(--album-text-secondary) !important;
    font-size: 13px;
    cursor: pointer;
    transition: var(--album-transition);
}

.album-detail-action:hover {
    border-color: var(--album-primary);
    color: var(--album-primary) !important;
}

.album-detail-action.ai {
    border-color: var(--album-primary);
    color: var(--album-primary) !important;
}

.album-detail-action.ai:hover {
    background: var(--album-primary) !important;
    color: #fff !important;
}

.album-detail-action.danger:hover {
    border-color: #ef4444;
    color: #ef4444 !important;
}

/* ==================== 上传进度 ==================== */

.album-upload-progress {
    padding: 24px;
    background: var(--album-card-bg);
    border-radius: var(--album-radius);
}

.album-upload-progress h4 {
    margin: 0 0 16px;
    color: var(--album-text);
}

.album-upload-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.album-upload-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--album-bg);
    border-radius: var(--album-radius-sm);
}

.album-upload-name {
    font-size: 13px;
    color: var(--album-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.album-upload-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

.album-upload-status.pending { color: var(--album-text-tertiary); }
.album-upload-status.uploading { color: var(--album-primary); }
.album-upload-status.done { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.album-upload-status.error { color: #ef4444; background: rgba(239, 68, 68, 0.1); }

.album-upload-done {
    margin-top: 16px;
    padding: 12px;
    text-align: center;
    color: var(--album-primary);
    font-weight: 500;
}

/* ==================== 搜索状态 ==================== */

.album-searching {
    text-align: center;
    padding: 60px 20px;
}

.album-searching-logo {
    animation: album-spin 1.5s linear infinite;
    display: inline-block;
}

@keyframes album-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.album-searching p {
    margin-top: 16px;
    color: var(--album-text-secondary);
}

.album-search-empty {
    text-align: center;
    padding: 60px 20px;
}

.album-search-empty-icon {
    margin-bottom: 16px;
}

.album-search-empty p {
    color: var(--album-text-secondary);
    margin: 4px 0;
}

.album-search-hint {
    color: var(--album-text-tertiary) !important;
    font-size: 13px !important;
}

.album-search-results {
    /* container */
}

.album-search-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--album-primary-light);
    border-radius: var(--album-radius-sm);
    margin-bottom: 16px;
    color: var(--album-primary);
    font-size: 14px;
    font-weight: 500;
}

.album-back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: 1px solid var(--album-border);
    border-radius: 18px;
    background: transparent !important;
    color: var(--album-text-secondary) !important;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: var(--album-transition);
}

.album-back-btn:hover {
    border-color: var(--album-primary);
    color: var(--album-primary) !important;
}

/* ==================== 空状态 ==================== */

.album-empty {
    text-align: center;
    padding: 80px 20px;
}

.album-empty-icon {
    margin-bottom: 16px;
}

.album-empty h4 {
    margin: 0 0 8px;
    color: var(--album-text);
    font-size: 18px;
}

.album-empty p {
    color: var(--album-text-tertiary);
    font-size: 14px;
}

/* ==================== 底部状态栏 ==================== */

.album-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    margin-top: 20px;
    border-top: 1px solid var(--album-border);
    font-size: 13px;
    color: var(--album-text-tertiary);
}

.album-footer span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==================== 拖拽区域 ==================== */

.album-drop-zone {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    background: rgba(79, 70, 229, 0.1);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.album-drop-inner {
    padding: 40px 60px;
    border: 3px dashed var(--album-primary);
    border-radius: 20px;
    background: var(--album-card-bg);
    text-align: center;
}

.album-drop-inner p {
    margin-top: 12px;
    color: var(--album-primary);
    font-size: 18px;
    font-weight: 500;
}

/* ==================== 分类详情页 ==================== */

.album-category-detail {
    /* container */
}

.album-category-title {
    margin: 0 0 20px;
    color: var(--album-text);
    font-size: 18px;
}

/* ==================== 响应式 ==================== */

@media (max-width: 768px) {
    .album-root { padding: 12px; }
    .album-toolbar { flex-wrap: wrap; }
    .album-search-wrap { width: 100%; flex: none; }
    .album-upload-trigger { padding: 8px 14px; font-size: 13px; }
    .album-upload-trigger span { display: none; }
    .album-detail-panel { padding: 16px; }
}

/* ==================== 加载骨架 ==================== */

.album-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--album-text-tertiary);
}

.album-onthisday-page {
    /* container */
}

.album-onthisday-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 20px;
    text-align: center;
}

.album-onthisday-header h3 {
    margin: 0;
    color: var(--album-text);
}

.album-onthisday-header p {
    color: var(--album-text-secondary);
    margin: 0;
}


/* ==================== v2 修复：语音按钮 + 浅色模式 ==================== */

/* 语音按钮（复用 Smart Bar 设计） */
.album-mic-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--album-border) !important;
    border-radius: 50%;
    background: transparent !important;
    color: var(--album-text-secondary) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.album-mic-btn:hover {
    color: var(--album-primary) !important;
    border-color: var(--album-primary) !important;
}

.album-mic-btn.album-mic-active {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #fff !important;
    animation: albumMicPulse 1.2s ease-in-out infinite;
}

@keyframes albumMicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* ==================== 浅色模式强制修复 ==================== */
/* 防御 theme.v2.css 的 html[data-theme=light] button { background: inherit !important } */
/* 特异性 (0,0,2,0) + !important > theme.v2.css 的 (0,0,1,2) + !important */

[data-theme="light"] .album-search-btn {
    background: #4f46e5 !important;
    color: #fff !important;
    border: none !important;
}

[data-theme="light"] .album-search-btn:hover {
    background: #4338ca !important;
}

[data-theme="light"] .album-search-btn svg {
    fill: #fff !important;
    stroke: #fff !important;
}

[data-theme="light"] .album-mic-btn {
    background: transparent !important;
    color: #64748b !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .album-mic-btn:hover {
    color: #4f46e5 !important;
    border-color: #4f46e5 !important;
}

[data-theme="light"] .album-mic-btn.album-mic-active {
    background: #ef4444 !important;
    color: #fff !important;
    border-color: #ef4444 !important;
}

[data-theme="light"] .album-upload-trigger {
    background: #4f46e5 !important;
    color: #fff !important;
    border: none !important;
}

[data-theme="light"] .album-upload-trigger:hover {
    background: #4338ca !important;
}

[data-theme="light"] .album-tab {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: none !important;
}

[data-theme="light"] .album-tab.active {
    background: #4f46e5 !important;
    color: #fff !important;
}

[data-theme="light"] .album-tab.active:hover {
    background: #4338ca !important;
}

[data-theme="light"] .album-detail-close {
    background: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
}

[data-theme="light"] .album-detail-nav {
    background: rgba(0, 0, 0, 0.4) !important;
    color: #fff !important;
}

[data-theme="light"] .album-detail-action {
    background: transparent !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .album-detail-action:hover {
    border-color: #4f46e5 !important;
    color: #4f46e5 !important;
}

[data-theme="light"] .album-detail-action.ai {
    border-color: #4f46e5 !important;
    color: #4f46e5 !important;
}

[data-theme="light"] .album-detail-action.ai:hover {
    background: #4f46e5 !important;
    color: #fff !important;
}

[data-theme="light"] .album-detail-action.danger:hover {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

[data-theme="light"] .album-back-btn {
    background: transparent !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .album-back-btn:hover {
    border-color: #4f46e5 !important;
    color: #4f46e5 !important;
}

[data-theme="light"] .album-growth-tab {
    background: transparent !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .album-growth-tab.active {
    background: #4f46e5 !important;
    color: #fff !important;
    border-color: #4f46e5 !important;
}

/* 搜索栏 logo 修复：确保 logo.webp 正确加载 */
.album-search-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    animation: album-breath 3.5s ease-in-out infinite;
}
