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

body {
    background: #f4f6fc;
    font-family: 'Inter', sans-serif;
    padding: 32px 24px;
    color: #1a1f2e;
}

.dashboard {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
}

.controls-panel {
    flex: 1.2;
    min-width: 280px;
    background: #ffffff;
    border-radius: 2rem;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.02);
    padding: 1.75rem 1.5rem;
    height: fit-content;
}

.controls-panel h2 {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1E2A5E, #55679C);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sub {
    font-size: 0.85rem;
    color: #5b6e8c;
    border-left: 3px solid #8aa2d4;
    padding-left: 12px;
    margin-bottom: 1.8rem;
}

.control-group {
    margin-bottom: 1.6rem;
}

.control-group label {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2c3e66;
    display: block;
    margin-bottom: 8px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #fefefe;
    font-family: 'Inter', monospace;
    font-size: 0.9rem;
    transition: 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #6c8fd1;
    box-shadow: 0 0 0 3px rgba(108, 143, 209, 0.2);
}

.color-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-row input[type="color"] {
    width: 60px;
    height: 48px;
    padding: 4px;
    border-radius: 16px;
    cursor: pointer;
}

.color-row span {
    flex: 1;
    font-size: 0.85rem;
    color: #2d3a5e;
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.btn {
    background: #f0f2f8;
    border: none;
    padding: 8px 14px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1e2f50;
}

.btn-outline {
    border: 1px solid #cdd9ed;
    background: white;
}

.btn-outline:hover {
    background: #eef3ff;
}

.range-value {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-top: 6px;
    color: #52658b;
}

.radio-group {
    display: flex;
    gap: 16px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    text-transform: none;
    font-size: 0.9rem;
    cursor: pointer;
}

.preview-panel {
    flex: 1.4;
    min-width: 380px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.card-preview {
    background: #fff;
    border-radius: 38px;
    box-shadow: 0 30px 45px -20px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.2);
    padding: 16px;
}

.social-card {
    width: 100%;
    max-width: 540px;
    aspect-ratio: 1 / 1;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.25);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    z-index: 1;
}

.post-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 2rem 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
}

.post-content.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
    padding: 1.5rem;
}

.split-image-area {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(0,0,0,0.1);
}

.split-image-area img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
    background-color: rgba(0,0,0,0.05);
}

.split-text-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    overflow-y: auto;
}

/* Image Only Mode Styles */
.post-content.image-only-mode {
    padding: 0;
}

.image-only-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.image-only-top {
    padding: 1.5rem 2rem 0.5rem 2rem;
}

.image-only-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 0;
}

.image-only-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 16px;
}

.image-only-bottom {
    padding: 0.5rem 2rem 1.5rem 2rem;
}

.image-only-mode .headline,
.image-only-mode .footer {
    margin: 0;
}

/* Template Styles */

/* 1. Neon Pulse */
.social-card.template-neon-pulse {
    background: #0a0a2a;
    box-shadow: 0 0 20px rgba(0,255,255,0.3), inset 0 0 20px rgba(0,255,255,0.1);
}

.social-card.template-neon-pulse .headline {
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 5px #0ff, 0 0 10px #0ff, 0 0 20px #0ff;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { text-shadow: 0 0 5px #0ff, 0 0 10px #0ff; }
    100% { text-shadow: 0 0 15px #0ff, 0 0 30px #0ff, 0 0 45px #0ff; }
}

/* 2. Retro Wave */
.social-card.template-retro-wave {
    background: linear-gradient(135deg, #2b1e4a, #1a0f2e);
    position: relative;
}

.social-card.template-retro-wave::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, rgba(255,0,100,0.1) 0px, rgba(255,0,100,0.1) 2px, transparent 2px, transparent 8px);
    pointer-events: none;
    z-index: 0;
}

.social-card.template-retro-wave .headline {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(45deg, #ff6a00, #ee0979);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 0 #000;
}

/* 3. Minimal Monochrome */
.social-card.template-minimal-monochrome {
    background: #000;
    position: relative;
}

.social-card.template-minimal-monochrome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, #fff 0px, #fff 2px, transparent 2px, transparent 8px);
    opacity: 0.1;
    pointer-events: none;
}

.social-card.template-minimal-monochrome .headline {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.social-card.template-minimal-monochrome .footer {
    border-top: 1px solid #fff;
    padding-top: 0.5rem;
}

/* 4. Watercolor Wash */
.social-card.template-watercolor-wash {
    background: linear-gradient(145deg, #c7ecee, #d1f2eb);
    position: relative;
}

.social-card.template-watercolor-wash .headline {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    font-weight: 700;
    color: #3b2e24;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* 5. Geometric Chaos */
.social-card.template-geometric-chaos {
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    position: relative;
    clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 85% 100%, 0% 100%);
}

.social-card.template-geometric-chaos .headline {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 4px 4px 0 #ff4e50;
}

.social-card.template-geometric-chaos .message {
    background: rgba(0,0,0,0.5);
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* 6. Vintage Postcard */
.social-card.template-vintage-postcard {
    background: #f4e9d2;
    position: relative;
}

.social-card.template-vintage-postcard .headline {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #5e3a2b;
    letter-spacing: 1px;
}

/* 7. 3D Depth */
.social-card.template-3d-depth {
    background: linear-gradient(145deg, #222, #000);
    perspective: 800px;
}

.social-card.template-3d-depth .headline {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 0 #aaa, 0 4px 0 #888, 0 6px 0 #666, 0 8px 0 #444, 0 10px 10px rgba(0,0,0,0.5);
    transform: rotateX(5deg);
}

/* 8. Nature Organic */
.social-card.template-nature-organic {
    background: linear-gradient(120deg, #2c5e2e, #5f8b4c);
    position: relative;
}

.social-card.template-nature-organic .headline {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: #f9e7c2;
    text-shadow: 2px 2px 4px #1e3a1e;
}

/* Shared text styles */
.headline, .message, .footer, .split-headline, .split-message, .split-footer {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    line-height: 1.4;
    color: #FFFFFF;
}

.headline {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.message {
    font-weight: 500;
    margin: 0.5rem 0;
    flex: 1 0 auto;
}

.footer {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: auto;
    opacity: 0.9;
}

.download-btn-big {
    background: #0f2b3d;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    max-width: 540px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 18px -8px rgba(0,0,0,0.2);
    transition: 0.2s;
}

.download-btn-big:hover {
    background: #1d4c6e;
    transform: scale(0.98);
}

hr {
    margin: 1rem 0;
    border: 0;
    height: 1px;
    background: linear-gradient(to right, #e2e8f0, transparent);
}

.date-picker-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.date-picker-row input[type="date"] {
    flex: 2;
}

.date-picker-row button {
    flex: 1;
    white-space: nowrap;
}

@media (max-width: 780px) {
    body {
        padding: 20px;
    }
    .controls-panel {
        order: 2;
    }
    .preview-panel {
        order: 1;
    }
    .post-content.split-layout {
        gap: 0.8rem;
        padding: 1rem;
    }
}#42445A