/*** Font imports and root variables ***/
/* Import additional display fonts used by the style gallery */
@import url('https://fonts.googleapis.com/css2?family=UnifrakturCook&family=MedievalSharp&family=Dancing+Script&display=swap');
/* More fonts added per request */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Satisfy&family=Bebas+Neue&family=Cormorant+Garamond:wght@400;600&family=Merriweather:wght@300;700&family=Oswald:wght@400;700&family=VT323&family=Raleway:wght@400;700&display=swap');

:root {
    --bg: #f3f3f3;
    --card: #ffffff;
    --muted: #7b7b7b;
    --accent: #222;
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: Montserrat, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    margin: 0;
    background: var(--bg);
    color: var(--accent);
}

.container {
    max-width: 1100px;
    margin: 36px auto;
    padding: 0 20px;
}

.header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    margin: 0 0 6px;
}

.lead {
    color: var(--muted);
    margin: 0 0 18px;
}

/* small byline and footer styling for attribution */
.byline {
    margin: 6px 0 10px;
    color: var(--muted);
    font-size: 14px;
}

.site-footer {
    margin: 36px 0 18px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.site-footer a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
}
.site-footer a:hover {
    color: var(--accent);
}

.controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.controls input {
    flex: 1;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 17px;
}

.controls button {
    padding: 10px 16px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    border: 0;
    cursor: pointer;
}

.controls .toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 8px;
}

.controls .toolbar input {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 220px;
}

.controls .toolbar select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.controls .toolbar button {
    padding: 8px 10px;
    border-radius: 8px;
    border: 0;
    background: #eee;
    cursor: pointer;
}


.styles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.card {
    background: var(--card);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    position: relative;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card .meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.style-label {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 1px;
}

.preview {
    font-size: 22px;
    font-weight: 600;
}

.controls .small {
    font-size: 13px;
}

.card .actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    background: transparent;
}

.btn-icon.heart.active {
    color: #e44;
}

.recent {
    margin-top: 30px;
}

.recent h2 {
    font-size: 20px;
    margin-bottom: 12px;
}

/* font variations for previews */
.font-elegant {
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.font-mono {
    font-family: 'Roboto Mono', monospace;
}

.font-spaced {
    letter-spacing: 8px;
}

.font-uppercase {
    text-transform: uppercase;
}

.font-large {
    font-size: 28px;
}

/* Additional style font utilities (matching screenshot variants) */
.font-old-english {
    /* Fraktur / Old English look */
    font-family: 'UnifrakturCook', 'Cinzel', serif;
    font-size: 22px;
}

.font-medieval {
    font-family: 'MedievalSharp', 'Cinzel', serif;
    font-size: 22px;
}

.font-scriptify {
    /* flowing script */
    font-family: 'Dancing Script', 'Great Vibes', cursive;
    font-size: 24px;
}

.font-italic {
    font-style: italic;
}

.font-bold {
    font-weight: 800;
}

.font-bold-italic {
    font-weight: 800;
    font-style: italic;
}

.font-fancy-large {
    font-size: 30px;
    font-weight: 700;
}

/* Additional decorative font utilities */
.font-pacifico {
    font-family: 'Pacifico', cursive;
    font-size: 28px;
}

.font-satisfy {
    font-family: 'Satisfy', cursive;
    font-size: 26px;
}

.font-bebas {
    font-family: 'Bebas Neue', 'Anton', sans-serif;
    font-size: 26px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.font-cormorant {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 24px;
}

.font-merri {
    font-family: 'Merriweather', serif;
    font-size: 22px;
}

.font-oswald {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 20px;
}

.font-vt323 {
    font-family: 'VT323', monospace;
    font-size: 22px;
}

.font-raleway {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 20px;
}

@media (max-width:760px) {
    .styles-grid {
        grid-template-columns: 1fr;
    }

    .preview {
        font-size: 20px;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .controls .toolbar {
        margin-left: 0;
        flex-wrap: wrap;
    }
}

.card .copy-hint {
    position: absolute;
    right: 14px;
    bottom: 10px;
    font-size: 11px;
    color: var(--muted);
}

.load-more-wrap {
    text-align: center;
    margin: 20px 0
}

.load-more-wrap button {
    padding: 12px 18px;
    border-radius: 8px;
    border: 0;
    background: #111;
    color: #fff;
    cursor: pointer
}

/* upload/decoration styles removed */

/* extra font helper classes */
.font-great {
    font-family: 'Great Vibes', cursive
}

.font-lobster {
    font-family: 'Lobster', cursive
}

.font-cinzel {
    font-family: 'Cinzel', serif
}

.font-anton {
    font-family: 'Anton', sans-serif;
    letter-spacing: 1px
}

/* purple variant used by some ornate styles */
.style-purple .preview {
    color: #6a2bdc;
}

/* boxed character helpers used by HTML-returning styles */
.boxed-char {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 6px 10px;
    margin: 0 6px;
    border-radius: 8px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.boxed-square {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 6px 8px;
    margin: 0 4px;
    border-radius: 6px;
    font-weight: 700
}

.boxed-line {
    display: inline-block
}

.rail-left,
.rail-right {
    color: #111;
    font-weight: 700;
    margin: 0 6px
}

.rail-text {
    font-weight: 600
}