/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f7fa;
    min-height: 100vh;
}

/* 响应式布局 */
.container {
    display: flex;
    min-height: 100vh;
}

/* 左侧导航 */
.sidebar {
    width: 250px;
    background-color: #2d3748;
    color: white;
    padding: 2rem 1rem;
    height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #4a5568;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a {
    color: #e2e8f0;
    text-decoration: none;
    padding: 0.75rem 1rem;
    display: block;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.sidebar a:hover, .sidebar a.active {
    background-color: #4a5568;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

h1 {
    color: #2d3748;
    margin-bottom: 1.5rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3182ce;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    margin: 0.5rem 0.25rem;
}

.btn:hover {
    background-color: #2b6cb0;
}

.btn-secondary {
    background-color: #718096;
}

.btn-secondary:hover {
    background-color: #4a5568;
}

/* 表单控件 */
input[type="file"], input[type="number"], input[type="color"], 
textarea, select {
    width: 100%;
    padding: 0.75rem;
    margin: 0.5rem 0 1.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 1rem;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

/* 图片预览区 */
.preview-container {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 2px dashed #cbd5e0;
    border-radius: 4px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
}

/* 控制组 */
.control-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
}

/* 水印画布样式 */
#watermarkCanvas {
    border: 1px solid #ddd;
    cursor: crosshair;
    max-width: 100%;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .sidebar li {
        flex: 1;
        min-width: 120px;
    }
}

/* 首页样式 */
.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.home-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.home-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.home-card h3 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.home-card p {
    color: #718096;
    margin-bottom: 1.5rem;
}

.home-card a {
    text-decoration: none;
}