﻿#head {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 13;
    width: 100%;
    height: 56px;
    background: linear-gradient(to bottom right, #00c4cc, #8b3dff);
    display: flex;
    align-items: center;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 左侧导航区域 */
.nav-section {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 3px;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

    .nav-item:hover {
        background: rgba(255, 255, 255, 0.15);
    }

.nav-separator {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 8px;
    font-size: 12px;
}

/* 中部工具栏区域 */
.toolbar-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.toolbar-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    position: relative;
}

    .toolbar-group:not(:last-child)::after {
        content: '';
        position: absolute;
        right: -10px;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 24px;
        background: rgba(255, 255, 255, 0.2);
    }

/* 颜色选择器样式 */
.color-input {
    width: 32px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background: none;
    cursor: pointer;
    padding: 0;
    margin: 0 2px;
    transition: all 0.15s ease;
}

    .color-input:hover {
        border-color: rgba(255, 255, 255, 0.5);
        transform: translateY(-1px);
    }

    .color-input::-webkit-color-swatch-wrapper {
        padding: 2px;
    }

    .color-input::-webkit-color-swatch {
        border: none;
        border-radius: 2px;
    }

/* 字体大小容器样式 */
.font-size-container {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 2px;
}

.font-size-icon {
    color: rgba(255, 255, 255, 1);
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    position: relative;
}


/* 字体大小纯输入框样式 */
.font-size-input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    border-radius: 3px;
    font-size: 12px;
    cursor: text;
    height: 28px;
    width: 50px;
    text-align: center;
    transition: all 0.15s ease;
}

    .font-size-input:focus {
        outline: none;
        background: white;
        border-color: #0078d4;
        width: 55px;
        box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
    }

    .font-size-input:hover {
        border-color: rgba(255, 255, 255, 0.5);
    }

    .font-size-input::placeholder {
        color: #666;
        font-size: 11px;
    }

/* 下拉框样式 */
.dropdown {
    /* 隐藏箭头 */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    padding: 4px 20px 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    height: 28px;
    margin: 0 2px;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4L2 0zM2 5L0 3h4L2 5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 8px;
}

    .dropdown:focus {
        outline: none;
        background: white;
        border-color: #0078d4;
    }

    .dropdown option {
        background: white;
        color: #333;
        padding: 4px;
    }

/* 特定下拉框宽度 */
.font-style-dropdown {
    min-width: 80px;
}

.shape-dropdown {
    min-width: 90px;
}

.image-dropdown {
    min-width: 90px;
}

.lineStart-dropdown {
    min-width: 90px;
}

.lineEnd-dropdown {
    min-width: 90px;
}

/* 对齐按钮组 */
.align-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.align-row {
    display: flex;
    align-items: center;
    gap: 2px;
}

.align-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 1);
    margin-right: 4px;
    min-width: 24px;
    text-align: center;
    font-weight: bold;
}

.align-group {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

/* 修改align-btn为div样式，移除button相关样式 */
.align-btn {
    background: none;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 24px;
    height: 20px;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    /* 防止文本选择 */
}

    .align-btn:last-child {
        border-right: none;
    }

    .align-btn:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .align-btn:active {
        background: rgba(255, 255, 255, 0.25);
    }

/* 三条线对齐图标 */
.align-lines {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 12px;
    height: 10px;
}

.line {
    height: 1px;
    background: currentColor;
    transition: all 0.15s ease;
}

/* 左对齐 - 长短不一，都靠左 */
.align-left .line:nth-child(1) {
    width: 100%;
}

.align-left .line:nth-child(2) {
    width: 75%;
}

.align-left .line:nth-child(3) {
    width: 75%;
}

.align-left .line:nth-child(4) {
    width: 75%;
}

.align-left .line:nth-child(1) {
    width: 100%;
}

/* 居中对齐 - 长短不一，都居中 */
.align-center .line:nth-child(1) {
    width: 100%;
    margin: 0 auto;
}

.align-center .line:nth-child(2) {
    width: 70%;
    margin: 0 auto;
}

.align-center .line:nth-child(3) {
    width: 70%;
    margin: 0 auto;
}

.align-center .line:nth-child(4) {
    width: 70%;
    margin: 0 auto;
}

.align-center .line:nth-child(5) {
    width: 100%;
    margin: 0 auto;
}

/* 右对齐 - 长短不一，都靠右 */
.align-right .line:nth-child(1) {
    width: 100%;
    margin-left: auto;
}

.align-right .line:nth-child(2) {
    width: 75%;
    margin-left: auto;
}

.align-right .line:nth-child(3) {
    width: 75%;
    margin-left: auto;
}

.align-right .line:nth-child(4) {
    width: 75%;
    margin-left: auto;
}

.align-right .line:nth-child(5) {
    width: 100%;
    margin-left: auto;
}

/* 垂直对齐图标 - 用方块表示 */
.align-vertical {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 12px;
    height: 10px;
    align-items: center;
}

.v-block {
    width: 8px;
    height: 2px;
    background: currentColor;
}

/* 顶部对齐 */
.align-top .v-block:first-child {
    background: currentColor;
}

.align-top .v-block:not(:first-child) {
    background: rgba(255, 255, 255, 0.3);
}

/* 垂直居中 */
.align-middle .v-block:nth-child(2) {
    background: currentColor;
}

.align-middle .v-block:not(:nth-child(2)) {
    background: rgba(255, 255, 255, 0.3);
}

/* 底部对齐 */
.align-bottom .v-block:last-child {
    background: currentColor;
}

.align-bottom .v-block:not(:last-child) {
    background: rgba(255, 255, 255, 0.3);
}

/* 右侧区域 */
.actions-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 100%;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.filename-box {
    position: relative;
}

.filename-input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    padding: 6px 32px 6px 12px;
    border-radius: 3px;
    font-size: 13px;
    width: 180px;
    transition: all 0.15s ease;
}

    .filename-input:focus {
        outline: none;
        background: white;
        border-color: #0078d4;
        width: 220px;
    }

    .filename-input::placeholder {
        color: #666;
    }

.filename-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
    pointer-events: none;
}

/* 导出下拉框样式 */
.export-dropdown {
    background: rgba(255, 255, 255, 0.95);
    color: #0078d4;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 6px 24px 6px 12px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    height: 28px;
    min-width: 80px;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%230078d4" d="M2 0L0 2h4L2 0zM2 5L0 3h4L2 5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 8px;
    appearance: none;
}

    .export-dropdown:hover {
        background-color: white;
        border-color: #0078d4;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .export-dropdown:focus {
        outline: none;
        background-color: white;
        border-color: #0078d4;
    }

    .export-dropdown option {
        background: white;
        color: #0078d4;
        padding: 8px;
    }

/* 工具提示 */
.align-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0.9;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .toolbar-container {
        gap: 16px;
    }
}

@media (max-width: 1024px) {
    .toolbar-container {
        gap: 12px;
    }

    .filename-input {
        width: 140px;
    }

        .filename-input:focus {
            width: 180px;
        }
}

@media (max-width: 768px) {
    .nav-section {
        padding: 0 12px;
    }

    .toolbar-section {
        padding: 0 8px;
    }

    .actions-section {
        padding: 0 12px;
        gap: 8px;
    }

    .filename-input {
        width: 120px;
    }

    .align-section {
        display: none;
    }
}

/* 页面内容 */
.content {
    padding: 40px 20px;
    background: white;
    margin: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.demo-text {
    color: #333;
    line-height: 1.6;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
    text-align: left;
}

.feature-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #0078d4;
}

    .feature-item h4 {
        color: #0078d4;
        margin-bottom: 10px;
    }

/* 操作反馈效果 */
.action-feedback {
    position: fixed;
    top: 70px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(300px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

    .action-feedback.show {
        transform: translateX(0);
    }

/* 文件名状态指示 */
.filename-status {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .filename-status.saved {
        color: #28a745;
        opacity: 1;
    }

    .filename-status.editing {
        color: #ffc107;
        opacity: 1;
    }

.convertFormula {
    color: white;
    font-weight: bold;
    cursor: pointer;
}

    .convertFormula:active {
        transform: translateY(2px);
    }

