/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 字体保持原样，如果需要可以调整 */
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
}

/* 头部样式 (保持原样) */
header {
    background-color: #a62a1a; /* 鼓狮红 */
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.error-message {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    background-color: #fddada;
    display: inline-block;
    font-weight: bold;
    width: 441px;
    margin-bottom: 20px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;

}

.logo img {
    height: 40px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

nav ul li a:hover, nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-actions {
    display: flex;
    align-items: center;
}

.login-btn, .register-btn {
    padding: 8px 16px;
    margin-left: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid white; /* 登录注册按钮保持白色边框在红色头部上 */
    color: white;
}

.login-btn:hover, .register-btn:hover {
     background-color: rgba(255, 255, 255, 0.1);
}


.user-profile {
    display: flex;
    align-items: center;
}

.username {
    color: white;
    text-decoration: none;
    margin-right: 15px;
    font-weight: 500;
}

.logout-btn {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

/* 主要内容区域 */
main {
    max-width: 1200px;
    margin: 20px auto; /* 顶部留白，左右居中 */
    padding: 0 20px;
}

/* 英雄区域 - 大BANNER */
.hero {
    /* 背景色改为红色 */
    background-color: #a62a1a; /* 鼓狮红 */
    border-radius: 8px;
    padding: 80px 20px; /* 增加垂直内边距，看起来更像banner */
    text-align: center;
    margin-bottom: 40px;
    /* 移除白色背景时的阴影，或者改为浅色阴影 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* 增加阴影深度 */
    color: white; /* 设置默认文本颜色为白色 */
}

.hero-content h1 {
    font-size: 40px; /* 字体更大 */
    margin-bottom: 20px;
    color: white; /* 标题颜色改为白色 */
    font-weight: bold;
}

.hero-content p {
    font-size: 18px; /* 字体更大 */
    color: #f0f0f0; /* 副标题使用浅一点的白色 */
    margin-bottom: 40px; /* 增加底部留白 */
    max-width: 700px; /* 限制副标题宽度 */
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6; /* 增加行高 */
}

.cta-btn {
    display: inline-block;
    padding: 12px 28px; /* 按钮更大 */
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600; /* 字体更粗 */
    margin: 0 10px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    font-size: 16px; /* 字体更大 */
}

/* 主要按钮样式 (立即体验) */
.primary-btn {
    background-color: white; /* 白色背景 */
    color: #a62a1a; /* 红色文本 */
    border: 1px solid white; /* 白色边框 */
}

.primary-btn:hover {
    background-color: #f0f0f0; /* 鼠标悬停时浅灰色背景 */
    color: #8d2121; /* 鼠标悬停时深红色文本 */
}

/* 次要按钮样式 (免费注册) */
.secondary-btn {
    background-color: transparent; /* 透明背景 */
    color: white; /* 白色文本 */
    border: 1px solid white; /* 白色边框 */
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.1); /* 鼠标悬停时浅透明白色背景 */
    color: white;
}


/* 功能特性区域 */
.features {
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    font-size: 32px; /* 标题更大 */
    margin-bottom: 50px; /* 增加底部留白 */
    color: #a62a1a; /* 鼓狮红 */
}

/* 功能卡片容器 - 使用Grid布局以便显示6个卡片 */
.feature-cards {
    display: grid;
    /* 自动调整列，最小宽度280px，最大宽度占满可用空间 */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; /* 增加卡片间距 */
}

.feature-card {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 调整阴影 */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* 增加动画 */
    display: flex; /* 使卡片内容居中 */
    flex-direction: column;
    align-items: center;
}

.feature-card:hover {
    transform: translateY(-8px); /* 鼠标悬停时上移更多 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); /* 鼠标悬停时阴影更深 */
}

/* 功能图标容器 */
.feature-icon {
    margin-bottom: 20px;
    /* 如果需要背景圆或方，可以在这里添加样式 */
}

/* SVG图标样式 */
.feature-svg-icon {
    width: 48px; /* SVG图标大小 */
    height: 48px;
    color: #a62a1a; /* SVG描边颜色 */
    fill: none; /* 确保填充是透明的，如果图标是填充的，改为 fill: #a62a1a; stroke: none; */
}

.feature-card h3 {
    font-size: 22px; /* 标题更大 */
    margin-bottom: 15px;
    color: #333;
    font-weight: 600; /* 字体更粗 */
}

.feature-card p {
    font-size: 15px; /* 字体稍大 */
    color: #555; /* 颜色稍深 */
    line-height: 1.6; /* 增加行高 */
}


/* 以下是原CSS中其他页面的样式，保持原样或根据需要调整 */

/* 画板管理样式 */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 24px;
    color: #a62a1a;
}

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

.create-btn {
    padding: 8px 16px;
    background-color: #a62a1a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.create-btn:hover {
    background-color: #8d2121;
}

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

.canvas-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.canvas-card:hover {
    transform: translateY(-5px);
}

.canvas-preview {
    height: 180px;
    overflow: hidden;
}

.canvas-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.canvas-info {
    padding: 15px;
}

.canvas-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.canvas-info p {
    font-size: 12px;
    color: #666;
}

.canvas-actions {
    display: flex;
    padding: 0 15px 15px;
}

.edit-btn, .delete-btn {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
}

.edit-btn {
    background-color: #a62a1a;
    color: white;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal h2 {
    margin-bottom: 20px;
    color: #a62a1a;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-actions {
    margin-top: 30px;
}

.submit-btn {
    width: 100%;
    padding: 10px;
    background-color: #a62a1a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

/* 颜色管理样式 */
.color-management {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.color-library, .color-creation {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-library h2, .color-creation h2 {
    margin-bottom: 20px;
    color: #a62a1a;
}

.color-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.color-card {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    width: calc(50% - 8px);
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    margin-right: 10px;
}

.color-info {
    display: flex;
    flex-direction: column;
}

.color-name {
    font-size: 14px;
    font-weight: 500;
}

.color-rgb {
    font-size: 12px;
    color: #666;
}

.color-picker-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.color-preview {
    display: flex;
    align-items: center;
    margin-top: 15px;
}

.color-preview-box {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    margin-right: 15px;
}

.color-preview-info {
    display: flex;
    flex-direction: column;
}

.color-preview-hex, .color-preview-rgb {
    font-size: 14px;
}

.save-color-btn {
    padding: 10px;
    background-color: #a62a1a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
}

.standard-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
}

.color-item {
    width: 20px;
    height: 20px;
    border-radius: 2px;
    cursor: pointer;

}

.color-item:hover {

    z-index: 1;
}

/* 登录和注册样式 */
.auth-container {
    max-width: 500px;
    margin: 40px auto;
}

.auth-box {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #a62a1a;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.form-footer a {
    color: #a62a1a;
    text-decoration: none;
}

/* 画板编辑页面样式 */
/* 组件库面板 */
.component-panel {
    width: 180px;
    background-color: white;
    border-right: 1px solid #e0e0e0;
    padding: 10px;
    overflow-y: auto;
}

.component-panel h3 {
    font-size: 16px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.component-list {
    list-style: none;
}

.component-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.component-item:hover {
    background-color: #f0f0f0;
}

.component-item i {

    width: 16px;
    text-align: center;
}

.component-item span {
    font-size: 14px;
}

/* 画板设置 */

.canvas-settings h3 {
    font-size: 16px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.setting-item input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.save-settings-btn {
    width: 100%;
    padding: 8px;
    background-color: #8d2121;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 15px;
}

/* 导出按钮样式 */
.export-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 5px;
    width: 100%;
}

.export-btn {
    padding: 9px 12px;
    background-color: var(--secondary-action-color); /* 假设你定义了CSS变量 */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.export-btn:hover {
    background-color: var(--secondary-action-hover); /* 假设你定义了CSS变量 */
}

/* 画布区域 */
.canvas-area {
    flex: 1;
    background-color: white;
    position: relative;
    overflow: auto;
}

#designCanvas {
    width: 100%;
    height: 100%;
    background-color: white;
    position: relative;
}

/* 属性面板 */
.properties-panel {
    width: 280px;
    background-color: white;
    border-left: 1px solid #e0e0e0;
    padding: 15px;
    overflow-y: auto;
}

.properties-panel h3 {
    font-size: 16px;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.property-group {
    margin-bottom: 20px;
}

.property-group h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #666;
}

.property-row {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.property-row label {
    width: 60px;
    text-align: right;
    margin-right: 10px;
    color: #666;
    font-size: 14px;
}

.property-row input[type="number"],
.property-row input[type="text"] {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.delete-element {
    margin-top: 15px;
}

/* 删除按钮样式，如果在属性面板使用，则保持原样 */
/* .delete-btn { ... } */


/* 颜色选择器 */
.color-picker-input {
    width: 100px;
}

/* 拖拽元素样式 */
.canvas-element {
    position: absolute;
    cursor: move;
    user-select: none;
    font-size: 14px;
    z-index: 1;
    overflow: hidden;
}

.canvas-element.dragging {
    opacity: 0.8;
    z-index: 100;
    border: 2px dashed #8d2121;
}

.canvas-element.selected {
    border: 2px solid #8d2121;
    z-index: 10;
}

/* 按钮样式 */
.button-element {
    background-color: #8d2121;
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* 文本框样式 */
.textbox-element {
    border: 1px solid #a62c1e;
    border-radius: 4px;
    padding: 5px;
    background-color: white;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 禁止文本框调整大小 */
.textbox-element {
    resize: none;
}

/* 圆形样式 */
.circle-element {
    background-color: #f0f0f0;
    border: 1px solid #a62c1e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 矩形样式 */
.rectangle-element {
    background-color: #f0f0f0;
    border: 1px solid #a62c1e;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 线条样式 */
.line-element {
    background-color: #000000;
}

/* 调整大小的控制点容器 */
.resize-container {
    position: absolute;
    bottom: 0;
    right: 0;
    pointer-events: none;
}

/* 调整大小的控制点 */
.resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    bottom: 0;
    right: 0;
    cursor: nwse-resize;
    background-color: transparent;
    pointer-events: auto;
}

/* 页脚样式 */
footer {
    background-color: #a62a1a; /* 鼓狮红 */
    color: white;
    padding: 30px 0;
    margin-top: 60px;
    text-align: center; /* 使页脚内容居中 */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex; /* 使页脚内容分布 */
    justify-content: center; /* 内容居中 */
    align-items: center;
    flex-wrap: wrap;
    gap: 20px; /* 增加链接和版权之间的间距 */
}

.footer-links {
    display: flex;
    gap: 20px; /* 链接之间的间距 */
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.copyright {
    font-size: 14px;
}
