/* ═══════════════════════════════════════════════════════════════
   7G PROMPTER — DESIGN SYSTEM
   AI Poster Generator by Seven Green
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    --primary: #16a34a;
    --primary-light: #4ade80;
    --primary-dark: #15803d;
    --accent: #FCB023;
    --accent-light: #fdd87a;
    --bg-main: #f0f5f1;
    --bg-card: #ffffff;
    --bg-header: linear-gradient(135deg, #0f2b1a 0%, #14532d 30%, #166534 60%, #1a7a40 100%);
    --text-primary: #1a1a2e;
    --text-secondary: #555770;
    --text-muted: #8a8da0;
    --border: #e2e4ea;
    --border-selected: var(--primary);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 760px;
    --coral: #f25c5c;
    --coral-dark: #d94444;
    --green: #22c55e;
    --green-dark: #16a34a;
}

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.header {
    background: var(--bg-header);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 8px rgba(22, 163, 74, 0.5));
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTAINER
   ═══════════════════════════════════════════════════════════════ */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */
.hero {
    text-align: center;
    padding: 40px 20px 30px;
}

.hero-logo {
    margin-bottom: 20px;
}

.hero-logo-text {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 15px rgba(22, 163, 74, 0.3));
    letter-spacing: -0.5px;
}

.hero-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.step-badge {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.step-active {
    background: var(--primary);
    color: #fff;
}

.step-accent {
    background: var(--accent);
    color: #fff;
}

.step-dots {
    color: var(--primary);
    font-size: 10px;
    letter-spacing: 2px;
}

.hero-desc {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   CONFIG CARDS
   ═══════════════════════════════════════════════════════════════ */
.config-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.config-card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px 0;
}

.badge-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.badge-green {
    background: var(--green);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.card-body {
    padding: 16px 24px 24px;
}

/* ═══════════════════════════════════════════════════════════════
   INPUT FIELDS
   ═══════════════════════════════════════════════════════════════ */
.input-field {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
    outline: none;
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
    outline: none;
    resize: vertical;
    min-height: 100px;
}

.input-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.input-textarea::placeholder {
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   OPTION GRID (Selectable buttons)
   ═══════════════════════════════════════════════════════════════ */
.option-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.option-btn {
    padding: 12px 8px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    line-height: 1.3;
}

.option-btn:hover {
    border-color: var(--primary-light);
    background: rgba(22, 163, 74, 0.04);
    transform: translateY(-1px);
}

.option-btn.selected {
    border-color: var(--primary);
    background: rgba(22, 163, 74, 0.08);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 0 0 1px var(--primary);
}

/* ═══════════════════════════════════════════════════════════════
   RATIO GRID
   ═══════════════════════════════════════════════════════════════ */
.ratio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ratio-btn {
    padding: 20px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.ratio-btn:hover {
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.ratio-btn.selected {
    border-color: var(--primary);
    background: rgba(22, 163, 74, 0.08);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 0 0 1px var(--primary);
}

.ratio-icon {
    border: 2px solid currentColor;
    border-radius: 3px;
}

.ratio-square {
    width: 36px;
    height: 36px;
}

.ratio-portrait {
    width: 30px;
    height: 38px;
}

.ratio-landscape {
    width: 44px;
    height: 26px;
}

.ratio-story {
    width: 24px;
    height: 42px;
}

/* ═══════════════════════════════════════════════════════════════
   MEDSOS GRID
   ═══════════════════════════════════════════════════════════════ */
.medsos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.medsos-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    transition: var(--transition);
}

.medsos-field:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.medsos-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.medsos-input {
    width: 100%;
    border: none;
    outline: none;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-primary);
    background: transparent;
}

.medsos-input::placeholder {
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   SPECIAL INSTRUCTIONS
   ═══════════════════════════════════════════════════════════════ */
.special-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.special-btn {
    padding: 10px 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.special-btn:hover {
    transform: translateY(-1px);
}

.special-btn.active {
    border-color: var(--primary);
    background: rgba(22, 163, 74, 0.08);
    color: var(--primary);
}

.special-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.special-dot.green { background: #22c55e; }
.special-dot.red { background: #ef4444; }
.special-dot.purple { background: #a855f7; }

.special-descriptions {
    padding: 12px 16px;
    background: #fafafe;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.special-descriptions p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 4px;
}

.special-descriptions p:last-child {
    margin-bottom: 0;
}

.special-descriptions strong {
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   PRESET SECTION
   ═══════════════════════════════════════════════════════════════ */
.preset-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid var(--primary-light);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-bottom: 16px;
}

.preset-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.preset-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preset-icon {
    font-size: 18px;
}

.preset-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.preset-count {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(0,0,0,0.05);
    padding: 2px 10px;
    border-radius: var(--radius-full);
}

.preset-actions {
    display: flex;
    gap: 8px;
}

.preset-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.preset-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.preset-btn-danger:hover {
    border-color: var(--coral);
    color: var(--coral);
}

.preset-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preset-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.preset-tag:hover {
    border-color: var(--primary);
    background: rgba(22, 163, 74, 0.06);
}

.preset-tag .tag-delete {
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
    transition: var(--transition);
}

.preset-tag .tag-delete:hover {
    color: var(--coral);
}

.preset-empty {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   ACTION BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.action-section {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-generate {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.35);
    letter-spacing: 0.3px;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-generate.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-reset {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
    color: #fff;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(242, 92, 92, 0.25);
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 92, 92, 0.35);
}

.btn-reset:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 18px;
}

/* ═══════════════════════════════════════════════════════════════
   OUTPUT SECTION
   ═══════════════════════════════════════════════════════════════ */
.output-section {
    animation: fadeInUp 0.5s ease;
}

.output-card {
    border: 2px solid var(--green);
}

.output-content {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 24px;
    border-radius: var(--radius-md);
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 600px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.output-content::-webkit-scrollbar {
    width: 6px;
}

.output-content::-webkit-scrollbar-track {
    background: #2a2a3e;
    border-radius: 3px;
}

.output-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.btn-copy {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    background: rgba(22, 163, 74, 0.08);
    color: var(--primary);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-copy:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   SAVE PRESET
   ═══════════════════════════════════════════════════════════════ */
.save-preset-section {
    animation: fadeInUp 0.4s ease;
}

.save-preset-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.5;
}

.save-preset-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-save-preset {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: #fff;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-save-preset:hover {
    background: var(--primary-dark);
}

.btn-cancel-preset {
    padding: 12px 24px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel-preset:hover {
    border-color: var(--coral);
    color: var(--coral);
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════════════════════════ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
    text-align: center;
    padding: 30px 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-generate.loading .btn-icon {
    animation: spin 1s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .option-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ratio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .medsos-grid {
        grid-template-columns: 1fr;
    }

    .hero-logo-text {
        font-size: 28px;
    }

    .hero-steps {
        gap: 4px;
    }

    .step-badge {
        padding: 5px 10px;
        font-size: 11px;
    }

    .step-dots {
        font-size: 8px;
    }

    .card-body {
        padding: 14px 16px 20px;
    }

    .card-header {
        padding: 14px 16px 0;
    }

    .preset-section {
        padding: 14px 16px;
    }

    .preset-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .special-grid {
        flex-direction: column;
    }

    .special-btn {
        justify-content: center;
    }

    .save-preset-actions {
        flex-direction: column;
    }
}

@media (max-width: 400px) {
    .option-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .option-btn {
        padding: 10px 6px;
        font-size: 12px;
    }

    .main-container {
        padding: 0 10px 30px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════ */
@media print {
    .header, .hero, .config-card, .preset-section, 
    .action-section, .save-preset-section, .footer, .toast {
        display: none !important;
    }

    .output-section {
        display: block !important;
    }

    .output-content {
        background: #fff;
        color: #000;
        border: 1px solid #ccc;
        max-height: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MARKETING SECTION
   ═══════════════════════════════════════════════════════════════ */
.marketing-section {
    margin-top: 40px;
    padding: 32px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    animation: fadeInUp 0.5s ease;
}

.marketing-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 8px;
}

.marketing-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 24px;
}

.marketing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 600px) {
    .marketing-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.bio-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bio-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #ffffff;
    border: 1.5px solid var(--primary-light);
    border-radius: var(--radius-full);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.08);
}

.bio-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(22, 163, 74, 0.15);
}

.bio-icon {
    font-size: 18px;
}

.youtube-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: #000;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

