* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    color: #1e2b3c;
}

:root {
    --accent: #5ca05c;
    --accent-light: #eaf4ea;
    --border-light: #e2e6ea;
    --bg-panel: #ffffff;
    --ribbon-bg: #fafbfc;
}

/* 首页 */
.home-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f0f4f9;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 40px 60px;
    overflow-y: auto;
}

.home-screen.hidden {
    display: none;
}

.home-header {
    display: flex;
    align-items: center;
    margin-bottom: 48px;
}

.home-logo {
    background: var(--accent);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 30px;
    margin-right: 24px;
    box-shadow: 0 8px 18px rgba(92, 160, 92, 0.2);
}

.home-title {
    font-size: 32px;
    font-weight: 600;
    color: #1a2b3c;
}

.home-sub {
    margin-left: 20px;
    font-size: 16px;
    color: #5e6f7e;
    background: #e9edf2;
    padding: 4px 14px;
    border-radius: 40px;
}

.upload-area {
    background: white;
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    border: 2px dashed var(--accent);
    margin-bottom: 48px;
    cursor: pointer;
}

.upload-area:hover {
    background: var(--accent-light);
}

.upload-area i {
    font-size: 64px;
    color: var(--accent);
    margin-bottom: 20px;
}

.recent-section {
    background: white;
    border-radius: 24px;
    padding: 28px;
    border: 1px solid #eef1f6;
}

.recent-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.clear-recent {
    color: var(--accent);
    background: none;
    border: 1px solid var(--accent-light);
    padding: 6px 16px;
    border-radius: 40px;
    cursor: pointer;
}

.recent-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    min-height: 100px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    background: #fafbfc;
    border-radius: 18px;
    cursor: pointer;
    border: 1px solid #eef1f5;
}

.recent-item:hover {
    background: var(--accent-light);
}

.recent-item i {
    color: var(--accent);
    font-size: 26px;
}

/* 主应用 */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f3f5f9;
}

.app-container.hidden {
    display: none;
}

.app-header {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-light);
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 60px;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-badge {
    background: var(--accent);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
}

.home-btn {
    background: none;
    border: none;
    color: #4a5a6a;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 10px;
}

.file-name {
    margin-left: 20px;
    font-size: 16px;
    font-weight: 500;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar {
    color: var(--accent);
    font-size: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-bar {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-light);
    padding: 0 24px;
    height: 42px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    color: #33475b;
    position: relative;
}

.menu-item {
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.menu-item:hover {
    background: #f5f7fa;
    border-bottom-color: var(--accent);
}

.menu-dropdown {
    position: absolute;
    top: 42px;
    left: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.08);
    min-width: 220px;
    z-index: 50;
    display: none;
    padding: 8px 0;
}

.menu-dropdown.show {
    display: block;
}

.menu-dropdown-item {
    padding: 10px 22px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-dropdown-item i {
    width: 20px;
    color: var(--accent);
}

.menu-dropdown-item:hover {
    background: var(--accent-light);
}

.ribbon-container {
    background: var(--ribbon-bg);
    border-bottom: 1px solid var(--border-light);
    padding: 8px 24px;
    flex-shrink: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.ribbon-btn {
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 6px 18px;
    font-size: 13px;
    color: #1e2b3c;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ribbon-btn i {
    font-size: 20px;
    color: var(--accent);
}

.ribbon-btn:hover {
    background: var(--accent-light);
}

.zoom-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 20px;
}

.zoom-slider {
    width: 140px;
}

.preview-main {
    flex: 1;
    overflow: auto;
    background: #eef1f5;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.preview-container {
    width: 100%;
    max-width: 1400px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
    padding: 24px;
    height: fit-content;
    transition: transform 0.1s;
}

iframe {
    border: none;
    border-radius: 12px;
    width: 100%;
    height: 800px;
}

img,
video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

audio {
    width: 100%;
    margin-top: 20px;
}

.archive-tree {
    font-family: monospace;
    padding: 10px;
    background: #fafbfc;
    border-radius: 12px;
}

.archive-item {
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 6px;
}

.archive-item:hover {
    background: var(--accent-light);
}

.archive-item i {
    margin-right: 12px;
    color: var(--accent);
}

.ppt-render-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ppt-slide-wrapper {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ppt-controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.ppt-controls button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 40px;
    font-size: 16px;
    cursor: pointer;
}

.ppt-controls span {
    font-size: 18px;
    font-weight: 500;
    align-self: center;
}

.status-bar {
    background: var(--bg-panel);
    border-top: 1px solid var(--border-light);
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-size: 13px;
    color: #5e6f7e;
    flex-shrink: 0;
    justify-content: space-between;
}

.unsupported {
    text-align: center;
    padding: 60px;
    color: #8a9aa8;
}

.excel-table {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
}

td,
th {
    border: 1px solid #ddd;
    padding: 8px 12px;
}

.text-preview {
    white-space: pre-wrap;
    background: #fafbfc;
    padding: 20px;
    border-radius: 12px;
}

.fullscreen-ppt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #111;
    z-index: 999;
    display: none;
    flex-direction: column;
}

.fullscreen-ppt.active {
    display: flex;
}

.fullscreen-ppt .ppt-header {
    padding: 16px;
    color: white;
    display: flex;
    justify-content: space-between;
}

.fullscreen-ppt .ppt-content {
    flex: 1;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fullscreen-ppt .ppt-slide-wrapper {
    max-width: 90%;
    background: white;
    border-radius: 20px;
    padding: 20px;
}