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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    color: #2d3436;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.input-section {
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.section-title {
    font-size: 1.3em;
    color: #495057;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}

textarea {
    width: 100%;
    height: 250px;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
    resize: vertical;
    transition: all 0.3s;
    line-height: 1.5;
}

textarea::placeholder {
    color: #6c757d;
    opacity: 0.8;
    font-style: italic;
}

textarea::-webkit-input-placeholder {
    color: #6c757d;
    opacity: 0.8;
    font-style: italic;
}

textarea::-moz-placeholder {
    color: #6c757d;
    opacity: 0.8;
    font-style: italic;
}

textarea:focus {
    outline: none;
    border-color: #74b9ff;
    box-shadow: 0 0 0 3px rgba(116, 185, 255, 0.1);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-group {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #495057;
    font-size: 0.9em;
}

select, input[type="number"], input[type="color"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

input[type="color"] {
    height: 40px;
    padding: 2px;
    cursor: pointer;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-generate {
    background: linear-gradient(45deg, #00b894, #00cec9);
    color: white;
}

.btn-clear {
    background: linear-gradient(45deg, #e17055, #d63031);
    color: white;
}

.btn-download-all {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.results {
    margin-top: 30px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.qr-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.qr-item:hover {
    border-color: #74b9ff;
    box-shadow: 0 5px 20px rgba(116, 185, 255, 0.2);
    transform: translateY(-2px);
}

.qr-text {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 15px;
    word-break: break-all;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    max-height: 80px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
}

.qr-canvas {
    margin: 15px 0;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    display: none; /* 默认隐藏 */
}

.qr-canvas.show {
    display: block;
}

.download-btn {
    background: #74b9ff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.download-btn:hover {
    background: #0984e3;
    transform: scale(1.05);
}

.status-bar {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
}

.status-success {
    background: #d1f2eb;
    color: #00b894;
    border: 1px solid #00b894;
}

.status-error {
    background: #ffeaa7;
    color: #e17055;
    border: 1px solid #e17055;
}

.show {
    opacity: 1;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #74b9ff;
}

.stat-label {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 5px;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #74b9ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.help-text {
    background: #e8f4f8;
    border: 1px solid #74b9ff;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    font-size: 14px;
    color: #495057;
}

@media (max-width: 768px) {
    .input-group {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-direction: column;
        gap: 15px;
    }
}
