:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.app-header {
    background: linear-gradient(135deg, var(--primary-color), #1a252f);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    position: relative;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    overflow: hidden;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.app-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.header-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="rgba(255,255,255,0.05)"><path d="M30,10 Q50,5 70,30 T90,70 Q95,50 70,30 T30,10Z"/></svg>') no-repeat;
    background-size: contain;
    background-position: center right;
}

.app-main {
    padding-bottom: 3rem;
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.title-icon {
    font-size: 1.8rem;
    margin-right: 1rem;
}

.section-title h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.input-section {
    margin-bottom: 2rem;
}

textarea {
    width: 100%;
    height: 300px;
    padding: 1.5rem;
    border: 2px solid #dfe6e9;
    border-radius: var(--border-radius);
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: var(--shadow);
}

textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.primary-btn {
    background: linear-gradient(to right, var(--secondary-color), #2980b9);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    cursor: pointer;
    width: 100%;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(41, 128, 185, 0.3);
}

.primary-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow);
}

.error-message {
    color: white;
    background-color: var(--accent-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    display: none;
    animation: fadeIn 0.3s ease;
}

.result-section {
    display: none;
    margin-top: 2rem;
    animation: fadeIn 0.5s ease;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.result-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(to right, var(--primary-color), #34495e);
    color: white;
}

.result-header h3 {
    font-size: 1.3rem;
    font-weight: 500;
}

.save-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: #2ecc71;
    transform: translateY(-1px);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.result-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.item-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.8rem;
}

.item-icon {
    font-size: 1.5rem;
    margin-right: 0.8rem;
}

.item-header h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.item-content {
    min-height: 100px;
    color: #333;
}

.result-list {
    list-style-type: none;
}

.result-list li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed #ddd;
}

.result-list li:last-child {
    border-bottom: none;
}

.loading {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .app-header h1 {
        font-size: 2rem;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
}

/* 强制导出样式 - 解决白色背景问题 */
.html2canvas-container, 
.result-section, 
.result-card, 
.result-item, 
.item-content {
    background: white !important;
    color: #333 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

/* 确保所有文字可见 */
.result-title, .info-title, .item-header h4, 
.result-list li, .item-content {
    color: #333 !important;
    background: transparent !important;
}

/* 打印样式 */
@media print {
    body, .app-container, .app-main, 
    .result-section, .result-card, 
    .result-item, .item-content {
        background: white !important;
        color: black !important;
    }
    
    .result-header {
        background: #2c3e50 !important;
        color: white !important;
    }
}