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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #FF2442 0%, #FF6B6B 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.subtitle {
    opacity: 0.9;
    font-size: 16px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.form-section h2,
.info-section h2 {
    color: #333;
    margin-bottom: 24px;
    font-size: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #FF2442;
    box-shadow: 0 0 0 3px rgba(255, 36, 66, 0.1);
}

.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.topics-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    min-height: 32px;
}

.topic-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, #FF2442 0%, #FF6B6B 100%);
    color: white;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    animation: fadeIn 0.3s ease-in;
}

.topic-tag .remove-btn {
    margin-left: 6px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.topic-tag .remove-btn:hover {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.preview-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #FF2442 0%, #FF6B6B 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 36, 66, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.qr-section {
    margin: 24px 0;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
}

.qr-section h3 {
    margin-bottom: 16px;
    color: #333;
}

.qr-container {
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#qrcode {
    margin: 0 auto;
}

#qrcode img {
    display: block;
    margin: 0 auto;
}

.qr-tip {
    margin-top: 12px;
    color: #666;
    font-size: 14px;
}

.share-url-box {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-url-box label {
    color: #555;
    font-weight: 500;
    white-space: nowrap;
}

.share-url-box input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    background: white;
}

.btn-copy {
    padding: 10px 16px;
    background: #FF2442;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-copy:hover {
    background: #e02040;
}

.status-panel {
    margin-top: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.status-panel h3 {
    margin-bottom: 12px;
    color: #333;
}

#statusContent {
    color: #666;
    line-height: 1.6;
}

.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.info-card h3 {
    color: #333;
    margin-bottom: 12px;
    font-size: 18px;
}

.info-card ul,
.info-card ol {
    padding-left: 20px;
    color: #666;
}

.info-card li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: #333;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #52c41a;
}

.toast.error {
    background: #ff4d4f;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    header {
        padding: 24px;
    }

    header h1 {
        font-size: 24px;
    }
    
    .share-url-box {
        flex-direction: column;
    }
    
    .share-url-box input {
        width: 100%;
    }
}