* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

.app {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    background: #f9f9f9;
    padding: 20px;
    border-right: 1px solid #eee;
    overflow-y: auto;
}

.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #fafafa;
}

h1 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.control {
    margin-bottom: 16px;
}

.control label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    margin-bottom: 4px;
}

.control input,
.control select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    background: white;
}

.control input:focus,
.control select:focus {
    outline: none;
    border-color: #007bff;
}

.control input[type="file"] {
    padding: 4px;
    font-size: 12px;
}

.control input[type="color"] {
    width: 40px;
    height: 28px;
    padding: 0;
    border: 1px solid #ddd;
    cursor: pointer;
}

.control input[type="range"] {
    padding: 0;
    height: 20px;
}

.control-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.control-row .control {
    flex: 1;
    margin-bottom: 0;
}

.buttons {
    margin-top: 20px;
    display: flex;
    gap: 8px;
}

.buttons button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

#generateBtn {
    background: #007bff;
    color: white;
}

#generateBtn:hover {
    background: #0056b3;
}

#downloadBtn {
    background: #28a745;
    color: white;
}

#downloadBtn:hover {
    background: #1e7e34;
}

.author-info {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #999;
}

.author-info p {
    margin: 2px 0;
}

.author-info a {
    color: #007bff;
    text-decoration: none;
}

.author-info a:hover {
    text-decoration: underline;
}

#canvas {
    max-width: 100%;
    max-height: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 响应式 */
@media (max-width: 768px) {
    .app {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    
    body {
        overflow: auto;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .main {
        padding: 15px;
    }
    
    .control-row {
        flex-direction: column;
        gap: 0;
    }
    
    .control-row .control {
        margin-bottom: 16px;
    }
}

/* 消息提示 */
.message {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 3px;
    color: white;
    font-size: 12px;
    z-index: 1000;
}

.message.success { background: #28a745; }
.message.error { background: #dc3545; }
.message.info { background: #17a2b8; }