/* 基础样式 - 暗黑主题 */
:root {
    --primary-color: #FF9500;
    --primary-dark: #E68600;
    --primary-light: #FFD699;
    --background: #121212; /* 保持与login相同 */
    --surface: #1E1E1E;
    --surface-light: #2D2D2D;
    --text-dark: #FFFFFF;
    --text-medium: #B0B0B0;
    --text-light: #757575;
    --danger: #FF453A;
    --success: #30D158;
    --warning: #FFD60A;
    --nav-bg: rgba(30, 30, 30, 0.95);
    --divider: rgba(255, 255, 255, 0.08);
    --overlay: rgba(0, 0, 0, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    background-color: #333333; /* 修改为login中的灰色背景 */
    color: var(--text-dark);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.container {
    width: 375px;
    height: 667px;
    background: var(--background); /* 使用与login相同的深色背景 */
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 40px;
    border: 10px solid #1a1a1a; /* 保持与login相同 */
    margin: 0 auto;
}

/* 导航栏 - 暗黑风格 */
.nav-bar {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--divider);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.menu-icon {
    width: 18px;
    height: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-dark);
    border-radius: 1px;
    transition: all 0.3s;
}

.menu-icon span:nth-child(1) {
    width: 70%;
}

.menu-icon span:nth-child(2) {
    width: 85%;
}

.menu-icon span:nth-child(3) {
    width: 100%;
}

.about-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface-light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.info-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.select-btn {
    font-size: 16px;
    color: var(--primary-color);
    background: transparent;
    border: none;
    padding: 6px 12px;
    transition: color 0.3s;
    cursor: pointer;
}

.select-btn:active {
    color: var(--primary-dark);
}

.user-icon {
    width: 28px;
    height: 28px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    cursor: pointer;
}

/* 欢迎区域 */
.welcome-section {
    padding: 12px 16px;
    border-bottom: 1px solid var(--divider);
}

.welcome-section h1 {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-dark);
}

.welcome-section .username {
    color: var(--primary-color);
    font-weight: 600;
}

/* 日历头部 - 暗黑风格 */
.calendar-header {
    padding: 12px 16px;
    background: var(--background);
    border-bottom: 1px solid var(--divider);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.today-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.today {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.calendar-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.calendar-toggle svg {
    width: 16px;
    height: 16px;
    fill: var(--text-medium);
    transition: transform 0.3s;
}

.calendar-toggle.active svg {
    transform: rotate(180deg);
}

/* 日历容器 - 初始隐藏 */
.calendar-container {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--surface);
    border-bottom: 1px solid var(--divider);
}

.calendar-container.expanded {
    max-height: 320px;
    padding-bottom: 16px;
}

.calendar-month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.month-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.month-prev, .month-next {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-dark);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: var(--text-medium);
    margin-bottom: 8px;
}

.calendar-weekday {
    padding: 4px;
}

.calendar-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-dark);
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 18px;
    transition: all 0.2s;
}

.calendar-day.current {
    color: var(--primary-color);
    font-weight: bold;
    position: relative;
}

.calendar-day.current::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
}

.calendar-day.other-month {
    color: var(--text-light);
    opacity: 0.5;
}

.calendar-day:not(.other-month):hover {
    background: rgba(255, 149, 0, 0.15);
}

/* 侧边栏 - 暗黑风格 */
.sidebar {
    position: fixed;
    top: 60px;
    left: -250px;
    width: 250px;
    height: calc(100% - 60px);
    background: var(--surface);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 20;
    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(250px);
}

.dialogue-title {
    font-size: 14px;
    color: var(--text-medium);
    padding: 12px 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-list {
    margin-top: 8px;
}

.theme-item {
    font-size: 16px;
    color: var(--text-dark);
    padding: 14px 24px;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.theme-item:active {
    background-color: rgba(255, 149, 0, 0.1);
}

.theme-item.active {
    background-color: rgba(255, 149, 0, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

/* 录音列表 - 暗黑风格 */
.record-list {
    padding: 16px 0;
    height: calc(100% - 180px);
    overflow-y: auto;
    background: var(--background);
}

.record-item {
    position: relative;
    padding: 16px 16px 16px 64px;
    transition: all 0.3s;
    background: var(--background);
    border-bottom: 1px solid var(--divider);
}

.record-item:active {
    background: rgba(255, 149, 0, 0.05);
}

/* 调整播放按钮大小 */
.play-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    color: #FFFFFF;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.2);
    transition: all 0.3s;
    cursor: pointer;
    padding: 0;
}

.play-btn:active {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(0.95);
}

.play-btn svg {
    width: 14px;
    height: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
}

.play-icon {
    opacity: 1;
}

.pause-icon {
    opacity: 0;
    display: block !important;
}

.play-btn.playing .play-icon {
    opacity: 0;
}

.play-btn.playing .pause-icon {
    opacity: 1;
}

.record-item.playing {
    background: rgba(255, 149, 0, 0.05);
}

.record-item.playing::after {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: var(--primary-color);
}

.duration {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
}

.text-content {
    position: relative;
    padding-left: 16px;
    margin-top: 8px;
}

.prefix-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.text {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.4;
}

.timestamp {
    font-size: 12px;
    color: var(--text-medium);
    margin-top: 4px;
    font-weight: 500;
}

.select-circle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: none;
    cursor: pointer;
}

.select-circle.selected {
    background: var(--primary-color);
}

.select-circle.selected::after {
    content: '✓';
    color: white;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal-content {
    max-width: 100%;
}

.profile-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.avatar-section {
    margin-bottom: 24px;
}

.avatar-label {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--surface-light);
    margin-bottom: 8px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.upload-text {
    font-size: 13px;
    color: var(--primary-color);
}

.username-section {
    margin-bottom: 24px;
}

.username-label {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.username-input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    background: var(--surface-light);
    color: var(--text-dark);
    outline: none;
}

.settings-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
}

.text-group {
    flex: 1;
}

.title {
    font-size: 17px;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.subtitle {
    font-size: 13px;
    color: var(--text-medium);
}

.switch {
    width: 51px;
    height: 31px;
    background: #333333;
    border-radius: 16px;
    position: relative;
    transition: background-color 0.3s;
}

.switch.active {
    background: var(--primary-color);
}

.switch-track {
    position: absolute;
    width: 27px;
    height: 27px;
    background: #FFFFFF;
    border-radius: 50%;
    left: 2px;
    top: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.switch.active .switch-track {
    transform: translateX(20px);
}

/* 分类和导出弹窗 - 暗黑风格 */
.category-modal, .export-modal, .delete-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.category-modal.visible, .export-modal.visible, .delete-confirm-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.category-modal .modal-content,
.export-modal .modal-content,
.delete-confirm-modal .modal-content {
    background: var(--surface);
    width: 80%;
    max-width: 300px;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.category-option, .export-option {
    padding: 12px;
    margin: 8px 0;
    background: rgba(255, 149, 0, 0.1);
    border-radius: 8px;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.category-option:active, .export-option:active {
    background: rgba(255, 149, 0, 0.2);
}

.cancel-category, .cancel-export {
    margin-top: 16px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
}

/* 操作成功提示 */
.copy-success-toast,
.export-success-toast,
.link-success-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.copy-success-toast.show,
.export-success-toast.show,
.link-success-toast.show {
    opacity: 1;
}

/* 多选操作栏 - 暗黑风格 */
.batch-actions {
    position: fixed;
    bottom: -60px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-around;
    align-items: center;
    transition: bottom 0.3s;
    z-index: 10;
}

.batch-actions.visible {
    bottom: 0;
}

.cancel-btn {
    font-size: 15px;
    color: var(--primary-color);
    background: transparent;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
}

.export-btn, .delete-btn, .classify-btn {
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.export-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.delete-btn {
    background: linear-gradient(135deg, var(--danger), #E74C3C);
    color: white;
}

.classify-btn {
    background: linear-gradient(135deg, #FFA042, var(--primary-color));
    color: white;
}

/* 麦克风按钮 - 暗黑风格 */
.mic-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.mic-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 30px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
    transition: all 0.3s;
    cursor: pointer;
}

.mic-btn:active {
    background: linear-gradient(135deg, var(--primary-dark), #D35400);
    transform: translateX(-50%) scale(0.95);
}

.mic-btn svg {
    width: 24px;
    height: 24px;
    fill: #FFFFFF;
}

/* 删除确认弹窗 - 暗黑风格 */
.delete-confirm-modal h3 {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.delete-confirm-modal p {
    font-size: 15px;
    color: var(--text-medium);
    margin-bottom: 20px;
}

.delete-confirm-modal .button-group {
    display: flex;
    justify-content: space-between;
}

.delete-confirm-modal .cancel-delete,
.delete-confirm-modal .confirm-delete {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    cursor: button;
}

.delete-confirm-modal .cancel-delete {
    background: rgba(60, 60, 60, 0.8);
    color: var(--text-dark);
    margin-right: 8px;
}

.delete-confirm-modal .confirm-delete {
    background: linear-gradient(135deg, var(--danger), #E74C3C);
    color: white;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* 禁用响应式 */
@media (min-width: 376px) {
    .container {
        transform: scale(1);
    }
}

/* 新增会员计划和主题切换相关样式 */
.membership-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.membership-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.membership-modal .modal-content {
    background: var(--surface);
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.membership-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
}

.membership-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px;
    padding: 20px;
    color: white;
}

.membership-badge {
    background-color: var(--warning);
    color: #333;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 15px;
}

.membership-features {
    margin-bottom: 20px;
}

.feature-item {
    margin-bottom: 8px;
    font-size: 15px;
}

.upgrade-btn {
    width: 100%;
    padding: 12px;
    background-color: white;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.upgrade-btn:active {
    transform: scale(0.98);
}

/* 主题切换选项 */
.appearance-options {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.appearance-option {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    border-radius: 8px;
    border: 1px solid var(--divider);
    cursor: pointer;
    transition: all 0.3s;
}

.appearance-option.active {
    border-color: var(--primary-color);
    background: rgba(255, 149, 0, 0.1);
}

.option-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border-radius: 50%;
}

.light-icon {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
}

.dark-icon {
    background-color: #333;
}

.system-icon {
    background: linear-gradient(to right, #f5f5f5 50%, #333 50%);
}

/* 提示信息样式 */
.toast-message {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    max-width: 80%;
    text-align: center;
}

.toast-message.show {
    opacity: 1;
}

/* 浅色主题变量 */
[data-theme="light"] {
    --background: #f5f5f5;
    --surface: #ffffff;
    --surface-light: #f0f0f0;
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    --divider: rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(255, 255, 255, 0.95);
}

/* 头像上传样式 */
.avatar-section {
    margin-bottom: 24px;
    text-align: center;
}

.avatar-label {
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 12px;
    display: block;
    text-align: left;
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 8px;
    background-color: var(--surface-light);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-text {
    font-size: 14px;
    color: var(--primary-color);
}

/* 导航栏头像样式 */
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 分组容器 */
.settings-group {
    margin-bottom: 20px;
}

/* 橙色标题样式 */
.section-title {
    padding: 0 16px;
    margin-bottom: 8px;
}

.section-title span {
    color: #FF9500;
    font-size: 16px;
    font-weight: 600;
}

/* 火箭图标精确控制 */
.fa-rocket.accent {
    color: #FF9500 !important;
    font-size: 20px;
    margin-right: 12px;
}

/* 设置项样式 */
.setting-item {
    background: #1E1E1E;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-item span {
    color: white;
    font-size: 16px;
}

/* 右侧箭头 */
.fa-chevron-right {
    color: white;
    font-size: 14px;
}