* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.editor-container, .preview-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.editor-container {
    flex: 1;
    min-width: 300px;
}

.preview-container {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

h3 {
    margin: 15px 0;
    color: #555;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #666;
}

input, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

button {
    background-color: #4169E1;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: bold;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #3a5ecc;
}

button:disabled {
    background-color: #b3b3b3;
    cursor: not-allowed;
}

.content-item {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

.remove-item {
    background-color: #ff4d4d;
    margin-top: 10px;
}

.remove-item:hover {
    background-color: #ff3333;
}

#addItem {
    width: 100%;
    margin-bottom: 20px;
}

#generateCard, #downloadCard {
    width: 100%;
    margin-top: 20px;
    font-size: 16px;
    padding: 12px;
}

#downloadCard {
    background-color: #28a745;
}

#downloadCard:hover {
    background-color: #218838;
}

/* 卡片样式 */
.card-preview {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.card {
    width: 400px;
    background-color: #4169E1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding-bottom: 20px;
    color: white;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.logo-container {
    margin-bottom: 15px;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: white;
}

.title-container {
    text-align: center;
    margin-bottom: 20px;
}

.title-container h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.title-container h2 {
    font-size: 20px;
    margin-bottom: 0;
}

.countdown-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.countdown-number {
    font-size: 100px;
    font-weight: bold;
    margin: 0 10px;
    background: linear-gradient(to bottom, #ffffff, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    /* 兼容性修复 */
    background-clip: text;
    color: #ffd700; /* 当gradient不工作时的备用颜色 */
}

.content-container {
    padding: 0 20px;
}

.content-item-preview {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.content-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.content-item-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 30px;
    background-color: #ffa500;
    color: white;
    font-weight: bold;
    border-radius: 4px;
    margin-right: 10px;
}

.content-item-title {
    font-weight: bold;
    font-size: 18px;
}

.content-item-body {
    font-size: 14px;
    line-height: 1.5;
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

.qr-code {
    width: 120px;
    height: 120px;
    background-color: white;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.qr-code img {
    max-width: 100%;
    max-height: 100%;
}

.default-qr {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    background-image: linear-gradient(45deg, #f2f2f2 25%, transparent 25%, transparent 75%, #f2f2f2 75%, #f2f2f2),
                      linear-gradient(45deg, #f2f2f2 25%, transparent 25%, transparent 75%, #f2f2f2 75%, #f2f2f2);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

.qr-container p {
    font-size: 14px;
    text-align: center;
}

/* 确保下载时卡片能正确渲染 */
.card.downloading {
    position: relative;
    z-index: 1000;
    box-shadow: none;
    /* 确保在下载时显示完整内容 */
    overflow: visible !important;
    transform: none !important;
    margin: 0 !important;
    /* 为高版本浏览器增加高质量渲染提示 */
    image-rendering: optimizeQuality;
    /* 确保背景色正确应用 */
    background-color: #4169E1 !important;
}

/* 确保内容在导出时可见 */
.card.downloading .content-item-preview {
    background-color: white !important;
    border-radius: 8px !important;
    overflow: visible !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

/* 确保QR码在导出时清晰 */
.card.downloading .qr-code {
    background-color: white !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.card.downloading .default-qr {
    /* 增强默认QR码在下载时的清晰度 */
    font-weight: bold !important;
    background-image: none !important;
    background-color: white !important;
} 