/* 基本样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #F3F4F6;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.controls {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab.active {
    border-bottom: 2px solid #4F46E5;
    color: #4F46E5;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input[type="text"],
.input-group input[type="number"],
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 16px;
}

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

button {
    background-color: #4F46E5;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #4338CA;
}

.button-secondary {
    background-color: #9CA3AF;
}

.button-secondary:hover {
    background-color: #6B7280;
}

.settings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.settings-group {
    background: #F9FAFB;
    border-radius: 8px;
    padding: 15px;
}

.settings-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #4F46E5;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 8px;
}

.cards-container {
    max-width: 900px;
    margin: 0 auto;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 30px rgba(79, 70, 229, 0.3);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 40px rgba(79, 70, 229, 0.4);
}

.card.preview-mode {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.card-top {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card-top::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.card-top::after {
    content: "";
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.card-badge {
    background: linear-gradient(135deg, #FF9900 0%, #FF5722 100%);
    color: white;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
    position: relative;
    z-index: 2;
    transition: transform 0.2s ease;
}

.card-badge:hover {
    transform: scale(1.05);
}

.card-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    max-width: 100%;
    word-wrap: break-word;
    white-space: pre-wrap;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.card-bottom {
    background-color: white;
    flex: 0.8;
    border-radius: 30px 30px 0 0;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-bottom::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #FF9900, #FF5722, #5B21B6, #4338CA);
}

.card-description {
    font-size: 18px;
    text-align: center;
    line-height: 1.8;
    margin: 0;
    max-width: 100%;
    word-wrap: break-word;
    white-space: pre-wrap;
    color: #333;
    font-weight: 500;
}

.highlight {
    color: #5B21B6;
    font-weight: 700;
}

.card-preview-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.preview-button {
    background-color: #4F46E5;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    position: relative;
    transition: background-color 0.2s, transform 0.2s;
}

.preview-button:hover {
    background-color: #3730A3;
    transform: scale(1.05);
}

.preview-button:active {
    transform: scale(0.95);
}

#cardCounter {
    font-weight: 600;
    color: #4B5563;
}

/* Card Style 1 - Modern Gradient */
.card-style-1 {
    background: linear-gradient(135deg, #5B21B6 0%, #4338CA 100%);
}

.card-style-1 .card-top {
    background: transparent;
}

.card-style-1 .card-badge {
    background: linear-gradient(135deg, #FF9900 0%, #FF5722 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
}

.card-style-1 .card-bottom {
    background-color: white;
    border-radius: 30px 30px 0 0;
}

.card-style-1 .card-bottom p {
    color: #333;
    font-weight: 500;
}

/* Card Style 2 - Dark Elegant */
.card-style-2 {
    background: linear-gradient(135deg, #121212 0%, #2D3748 100%);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid #4A5568;
}

.card-style-2 .card-top {
    background: transparent;
    position: relative;
    overflow: hidden;
}

.card-style-2 .card-top::before {
    content: "";
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 50%;
}

.card-style-2 .card-top::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 80px;
    height: 80px;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 50%;
}

.card-style-2 .card-badge {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    position: relative;
    z-index: 2;
}

.card-style-2 .card-title {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.card-style-2 .card-bottom {
    background-color: #1A202C;
    border-top: 1px solid #4A5568;
    border-radius: 30px 30px 0 0;
    position: relative;
    overflow: hidden;
}

.card-style-2 .card-bottom::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #4F46E5, #7C3AED);
}

.card-style-2 .card-bottom p {
    color: #E2E8F0;
    font-weight: 500;
}

/* Card Style 3 - Soft Pastel */
.card-style-3 {
    background: linear-gradient(135deg, #FDF2F8 0%, #FBCFE8 50%, #F9A8D4 100%);
    box-shadow: 0 20px 30px rgba(236, 72, 153, 0.2);
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.card-style-3 .card-top {
    background: transparent;
    position: relative;
    overflow: hidden;
}

.card-style-3 .card-top::before {
    content: "";
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    filter: blur(5px);
}

.card-style-3 .card-top::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: -10px;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    filter: blur(3px);
}

.card-style-3 .card-badge {
    background: linear-gradient(135deg, #F472B6 0%, #DB2777 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(219, 39, 119, 0.3);
    position: relative;
    z-index: 2;
    transform-origin: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.card-style-3 .card-top h2 {
    color: #BE185D;
    text-shadow: 0 2px 5px rgba(190, 24, 93, 0.2);
    position: relative;
    z-index: 2;
}

.card-style-3 .card-bottom {
    background-color: white;
    border-radius: 30px 30px 0 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -5px 15px rgba(236, 72, 153, 0.1);
}

.card-style-3 .card-bottom::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #F472B6, #EC4899, #DB2777);
}

.card-style-3 .card-bottom p {
    color: #9D174D;
    font-weight: 500;
}

/* Card Style 4 - Neon Glow */
.card-style-4 {
    background: #121212;
    box-shadow: 0 0 20px rgba(0, 245, 160, 0.5);
}

.card-style-4 .card-top {
    background: #121212;
}

.card-style-4 .card-badge {
    background: #00F5A0;
    color: #121212;
    box-shadow: 0 0 10px rgba(0, 245, 160, 0.7);
}

.card-style-4 .card-top h2 {
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(0, 245, 160, 0.7);
}

.card-style-4 .card-bottom {
    background-color: #1A1A1A;
    flex: 1;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 2px solid #00F5A0;
}

.card-style-4 .card-bottom p {
    font-size: 16px;
    text-align: center;
    line-height: 1.8;
    color: #FFFFFF;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Card Style 5 - Minimalist */
.card-style-5 {
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid #F3F4F6;
    position: relative;
}

.card-style-5::before {
    content: "";
    position: absolute;
    top: 20px;
    right: 20px;
    bottom: 20px;
    left: 20px;
    border: 1px solid #E5E7EB;
    pointer-events: none;
}

.card-style-5 .card-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    color: #111827;
    text-align: center;
    position: relative;
}

.card-style-5 .card-badge {
    background: #F9FAFB;
    color: #111827;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 4px;
    margin-bottom: 30px;
    border: 1px solid #E5E7EB;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.card-style-5 .card-top h2 {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.5px;
    position: relative;
}

.card-style-5 .card-top h2::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #111827;
}

.card-style-5 .card-bottom {
    background-color: #F9FAFB;
    flex: 0.8;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 1px solid #E5E7EB;
}

.card-style-5 .card-bottom p {
    font-size: 16px;
    text-align: center;
    line-height: 1.8;
    color: #4B5563;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Card Style 6 - Retro */
.card-style-6 {
    background: #FFD166;
    border: 4px solid #073B4C;
    box-shadow: 8px 8px 0 #073B4C;
    transform: rotate(-1deg);
    position: relative;
    overflow: visible;
}

.card-style-6::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    width: 30px;
    height: 30px;
    background: #EF476F;
    border-radius: 50%;
    border: 3px solid #073B4C;
    z-index: 3;
}

.card-style-6::after {
    content: "";
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: #06D6A0;
    border-radius: 50%;
    border: 3px solid #073B4C;
    z-index: 3;
}

.card-style-6 .card-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #073B4C;
    text-align: center;
    background: #FFD166;
    position: relative;
    overflow: hidden;
}

.card-style-6 .card-top::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(#073B4C 2px, transparent 2px),
        radial-gradient(#073B4C 2px, transparent 2px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    opacity: 0.1;
}

.card-style-6 .card-badge {
    background: #EF476F;
    color: white;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 0;
    margin-bottom: 20px;
    box-shadow: 3px 3px 0 #073B4C;
    transform: rotate(2deg);
    border: 2px solid #073B4C;
    position: relative;
    z-index: 2;
}

.card-style-6 .card-top h2 {
    font-size: 32px;
    font-weight: 900;
    color: #073B4C;
    text-transform: uppercase;
    letter-spacing: -1px;
    position: relative;
    z-index: 2;
    text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.5);
}

.card-style-6 .card-bottom {
    background-color: white;
    flex: 0.8;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 4px solid #073B4C;
    position: relative;
}

.card-style-6 .card-bottom::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px dashed #073B4C;
    opacity: 0.2;
    pointer-events: none;
}

.card-style-6 .card-bottom p {
    font-size: 18px;
    text-align: center;
    line-height: 1.6;
    color: #073B4C;
    font-weight: 700;
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

/* Card Style 7 - Glassmorphism */
.card-style-7 {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    position: relative;
    overflow: hidden;
}

.card-style-7::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 80%);
    transform: rotate(45deg);
    pointer-events: none;
}

.card-style-7 .card-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: white;
    text-align: center;
    background: linear-gradient(135deg, rgba(130, 201, 233, 0.3) 0%, rgba(122, 146, 244, 0.3) 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.card-style-7 .card-top::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0) 100%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.card-style-7 .card-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.card-style-7 .card-top h2 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.card-style-7 .card-bottom {
    background-color: rgba(255, 255, 255, 0.1);
    flex: 0.8;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card-style-7 .card-bottom::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.card-style-7 .card-bottom p {
    font-size: 16px;
    text-align: center;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

/* Card Style 8 - Cyberpunk */
.card-style-8 {
    background: #121212;
    border: 2px solid #F706CF;
    box-shadow: 0 0 25px rgba(247, 6, 207, 0.5), inset 0 0 10px rgba(247, 6, 207, 0.2);
}

.card-style-8 .card-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: white;
    text-align: center;
    background: #121212;
    position: relative;
    overflow: hidden;
}

.card-style-8 .card-top::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, rgba(18, 18, 18, 0) 0%, rgba(247, 6, 207, 0.1) 50%, rgba(18, 18, 18, 0) 100%),
        linear-gradient(180deg, rgba(18, 18, 18, 0) 0%, rgba(0, 255, 255, 0.1) 50%, rgba(18, 18, 18, 0) 100%);
    background-size: 100% 50px;
    animation: scanline 4s linear infinite;
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

.card-style-8 .card-badge {
    background: #00FFFF;
    color: #121212;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 0;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%);
}

.card-style-8 .card-top h2 {
    font-size: 32px;
    font-weight: 800;
    color: #F706CF;
    text-shadow: 0 0 10px rgba(247, 6, 207, 0.7), 0 0 20px rgba(247, 6, 207, 0.5);
    letter-spacing: -1px;
    text-transform: uppercase;
}

.card-style-8 .card-bottom {
    background-color: #1A1A1A;
    flex: 1;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 2px solid #F706CF;
    position: relative;
    overflow: hidden;
}

.card-style-8 .card-bottom::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 255, 0.1) 0%, rgba(18, 18, 18, 0) 70%);
}

.card-style-8 .card-bottom p {
    font-size: 16px;
    text-align: center;
    line-height: 1.8;
    color: #FFFFFF;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

/* Card Style 9 - Natural/Green */
.card-style-9 {
    background: #F4F8F0;
    border: none;
    box-shadow: 0 15px 30px rgba(76, 175, 80, 0.15), 0 5px 15px rgba(76, 175, 80, 0.1);
    position: relative;
    overflow: hidden;
}

.card-style-9::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%234CAF50' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    pointer-events: none;
}

.card-style-9 .card-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    color: #2C5E1A;
    text-align: center;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    position: relative;
    overflow: hidden;
}

.card-style-9 .card-top::before {
    content: "🌿";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    opacity: 0.3;
    z-index: 1;
}

.card-style-9 .card-top::after {
    content: "🌱";
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 24px;
    opacity: 0.3;
    z-index: 1;
}

.card-style-9 .card-badge {
    background: #4CAF50;
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
    z-index: 2;
    position: relative;
}

.card-style-9 .card-badge::before {
    content: "🍃";
    margin-right: 5px;
}

.card-style-9 .card-top h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1B5E20;
    z-index: 2;
    position: relative;
}

.card-style-9 .card-bottom {
    background-color: white;
    flex: 0.8;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 3px solid #A5D6A7;
    position: relative;
}

.card-style-9 .card-bottom::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A, #CDDC39);
}

.card-style-9 .card-bottom p {
    font-size: 16px;
    text-align: center;
    line-height: 1.8;
    color: #2E7D32;
    position: relative;
    z-index: 2;
}

/* Card Style 10 - Monochrome */
.card-style-10 {
    background: white;
    border: 2px solid black;
    box-shadow: 10px 10px 0 black;
    position: relative;
    overflow: hidden;
}

.card-style-10::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, #000 25%, transparent 25%), 
        linear-gradient(-45deg, #000 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #000 75%), 
        linear-gradient(-45deg, transparent 75%, #000 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.03;
    pointer-events: none;
}

.card-style-10 .card-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    color: black;
    text-align: center;
    background: white;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid black;
}

.card-style-10 .card-top::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: black;
}

.card-style-10 .card-badge {
    background: black;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.card-style-10 .card-badge::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid black;
}

.card-style-10 .card-top h2 {
    font-size: 36px;
    font-weight: 900;
    color: black;
    text-transform: uppercase;
    letter-spacing: -1px;
    position: relative;
    margin-bottom: 10px;
}

.card-style-10 .card-top h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: black;
}

.card-style-10 .card-bottom {
    background-color: white;
    flex: 0.8;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.card-style-10 .card-bottom::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px dashed black;
    opacity: 0.2;
    pointer-events: none;
}

.card-style-10 .card-bottom p {
    font-size: 16px;
    text-align: center;
    line-height: 1.8;
    color: black;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* Download Button Style */
.download-all {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 20px 0 50px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.5);
}

.download-all svg {
    width: 20px;
    height: 20px;
}

.download-options {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.card-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.card-checkbox-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 8px;
}

.card-checkbox-wrapper:hover {
    background-color: #f3f4f6;
}

.card-checkbox-wrapper.selected {
    background-color: #e0e7ff;
    box-shadow: 0 0 0 2px #4F46E5;
}

.card-mini {
    width: 100px;
    height: 133px; /* 保持3:4比例 */
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
}

.card-mini-info {
    font-size: 14px;
    font-weight: 500;
    color: #4B5563;
    text-align: center;
}

.card-for-download {
    display: none;
    position: fixed;
    top: -9999px;
    left: -9999px;
    z-index: -1;
    width: 900px;
    height: auto;
    aspect-ratio: 3/4;
    background: transparent;
    overflow: hidden;
}

.card-for-download .card {
    width: 100%;
    height: 100%;
    margin: 0;
    box-shadow: 0 20px 30px rgba(79, 70, 229, 0.3);
    border-radius: 24px;
    overflow: hidden;
}

.card-for-download .sparkles {
    display: block;
}

.card-bottom p {
    white-space: pre-line; /* 支持换行显示 */
}

#downloadProgress {
    width: 100%;
    background-color: #f3f4f6;
    height: 10px;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
    display: none;
}

#progressBar {
    height: 100%;
    background-color: #4F46E5;
    width: 0%;
    transition: width 0.3s ease;
}

#statusMessage {
    margin-top: 10px;
    font-size: 14px;
    color: #4F46E5;
    text-align: center;
    min-height: 20px;
}

/* Media queries for smaller screens */
@media (max-width: 768px) {
    .controls, .cards-container, .download-options {
        padding: 15px;
    }
    
    .card-select-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .controls, .cards-container, .download-options {
        padding: 10px;
    }
    
    button {
        width: 100%;
    }
    
    .card-select-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}