.main-content {
    flex: 1;
    padding: 24px 16px;
    max-width: 100%;
    overflow-x: hidden;
    background: var(--bg);
    position: relative;
    z-index: 1;
}

.cta-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.cta-left {
    flex-shrink: 0;
}

.help-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.help-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(360deg);
    border-color: rgba(255, 255, 255, 0.5);
}

.help-btn:active {
    transform: scale(0.95);
}

.cta-right {
    flex: 1;
    text-align: right;
    padding-right: 16px;
    position: relative;
    z-index: 1;
}

.cta-text {
    font-size: 18px;
    font-weight: 600;
    color: white;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cta-highlight {
    color: #FFD700;
    font-weight: 800;
    font-size: 20px;
    display: block;
    margin-top: 4px;
    text-shadow: 0 2px 15px rgba(255, 215, 0, 0.5);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

.template-card {
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    aspect-ratio: 0.85;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.template-card:hover::before {
    opacity: 1;
}

.template-card:hover {
    transform: translateY(-8px) scale(1.02) rotateY(2deg);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary);
}

.template-card:active {
    transform: translateY(-4px) scale(1.01);
}

.template-image {
    flex: 1;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.template-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.template-card:hover .template-image::after {
    opacity: 1;
}

.template-3d {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.template-card:hover .template-3d {
    transform: rotateY(8deg) rotateX(-5deg) scale(1.08);
}

.template-3d img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
    transition: filter 0.3s ease;
}

.template-card:hover .template-3d img {
    filter: drop-shadow(0 15px 30px rgba(102, 126, 234, 0.3));
}

.template-label {
    padding: 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.template-card:hover .template-label {
    color: var(--secondary);
}

.template-card[data-color="green"] .template-image {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
}

.template-card[data-color="blue"] .template-image {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
}

.template-card[data-color="beige"] .template-image {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.template-card[data-color="purple"] .template-image {
    background: linear-gradient(135deg, #E9D5FF 0%, #DDD6FE 100%);
}

.template-card[data-color="pink"] .template-image {
    background: linear-gradient(135deg, #FCE7F3 0%, #FBCFE8 100%);
}

.template-card[data-color="orange"] .template-image {
    background: linear-gradient(135deg, #FED7AA 0%, #FDBA74 100%);
}

.template-card[data-color="teal"] .template-image {
    background: linear-gradient(135deg, #CCFBF1 0%, #99F6E4 100%);
}

@media (min-width: 640px) {
    .templates-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 24px;
    }
    
    .cta-text {
        font-size: 20px;
    }
    
    .cta-highlight {
        font-size: 22px;
    }
}

@media (min-width: 768px) {
    .main-content {
        padding: 32px 24px;
    }

    .templates-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .template-card {
        aspect-ratio: 0.9;
    }
    
    .cta-section {
        padding: 24px 32px;
        margin-bottom: 40px;
    }
}

@media (min-width: 1024px) {
    .templates-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
    
    .template-card {
        aspect-ratio: 0.95;
    }
}

@media (min-width: 1200px) {
    .templates-grid {
        max-width: 1400px;
    }
}
