/**
 * Livecase: showcase styles (extracted from Respect for Creators showcase engine).
 * (c) unparzd.com — https://unparzd.com
 * Licensed under the Livecase License Agreement (see LICENSE_EN.txt / LICENSE_DE.txt).
 * You may remove or modify this notice for your own projects per the license terms.
 */

:root {
    --neon: #e1ff00;
    --bg: #0d1117;
    --text: #e6edf3;
    --font-main: 'Courier New', Courier, monospace;
    --page-bg: #0a0e14;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    background: var(--page-bg);
    color: var(--text);
}

.lc-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.lc-header {
    text-align: center;
    padding: 2.5rem 1.5rem 1rem;
}

.lc-kicker {
    margin: 0 0 0.5rem;
    font-family: var(--font-main);
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--neon);
}

.lc-title {
    margin: 0 0 0.75rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: normal;
    color: #fff;
}

.lc-lead {
    margin: 0 auto;
    max-width: 560px;
    font-size: 1rem;
    line-height: 1.6;
    color: #9aa4af;
}

.lc-copy-hint {
    max-width: 720px;
    margin: 0 auto 1.25rem;
    padding: 0.85rem 1.1rem;
    border-left: 3px solid var(--neon);
    background: rgba(225, 255, 0, 0.06);
    border-radius: 0 4px 4px 0;
}

    .lc-copy-hint p {
        margin: 0;
        font-size: 0.82rem;
        line-height: 1.6;
        color: #b0b8c0;
    }

    .lc-copy-hint strong {
        color: var(--neon);
        font-weight: bold;
    }

html.lc-embed .lc-copy-hint {
    display: none;
}

.lc-main {
    flex: 1 1 auto;
}

.lc-footer {
    padding: 2rem 1.5rem 2.5rem;
    text-align: center;
    font-size: 0.82rem;
    color: #6e7681;
}

.lc-footer code {
    font-family: var(--font-main);
    font-size: 0.78rem;
    color: #b0b8c0;
}

.lc-error {
    grid-column: 1 / -1;
    text-align: center;
    color: #ff8a8a;
    padding: 2rem;
}

.animations-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 10px 40px 20px;
}

.grid-layout-triple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 350px));
    gap: 30px;
    justify-content: center;
}

.anim-preview-card {
    background: #1a242d;
    border: 1px solid #555555;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.showcase-header {
    padding: 10px 15px;
    background: var(--bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #555555;
    position: relative;
}

.tab {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 5px 8px;
    font-size: 0.75rem;
    font-family: sans-serif;
    text-transform: uppercase;
    position: relative;
    transition: color 0.8s ease;
}

.tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.tab:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.tab.active { color: var(--neon); }
.tab.active::after {
    transform: scaleX(1);
    background-color: var(--neon);
}

.copy-btn {
    background: transparent;
    color: var(--neon);
    padding: 6px 14px;
    border: 1px solid color-mix(in srgb, var(--neon) 30%, transparent);
    border-radius: 2px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.copy-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.copy-btn:hover {
    color: #fff;
    background: rgba(245, 242, 6, 0.05);
    border-color: var(--neon);
    padding-left: 20px;
    padding-right: 8px;
}

.copy-btn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.copy-btn::before {
    content: '→';
    position: absolute;
    left: -10px;
    opacity: 0;
    transition: all 0.4s ease;
}

.copy-btn:hover::before {
    left: 6px;
    opacity: 1;
}

.showcase-body {
    height: 250px;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.tab-content {
    display: none;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.tab-content.no-padding { padding: 0 !important; }

.tab-content.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tab-content.active[id$="-html"],
.tab-content.active[id$="-css"],
.tab-content.active[id$="-js"] {
    display: block !important;
    text-align: left !important;
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: transparent;
}

pre {
    color: var(--text);
    font-size: 0.8rem;
    margin: 0 !important;
    padding: 0 !important;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left !important;
    display: block !important;
    width: 100%;
    font-family: var(--font-main);
}

.showcase-footer {
    padding: 12px 15px;
    border-top: 1px solid #555555;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.75rem;
    color: var(--neon);
    background: var(--bg);
    text-transform: uppercase;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.effect-name {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--neon);
    font-weight: 500;
    line-height: 1;
}

.creator-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
}

.creator-name {
    font-size: 0.8rem;
    text-transform: none;
    color: var(--text);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.creator-link:hover .creator-name {
    opacity: 1;
    color: var(--text);
}

.lc-copy-count {
    color: var(--neon);
    font-weight: bold;
    font-family: var(--font-main);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.tab-content::-webkit-scrollbar { width: 4px; }
.tab-content::-webkit-scrollbar-thumb {
    background: #2f3d48;
    border-radius: 10px;
}

.refresh-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.8s ease;
}

.anim-preview-card:hover .tab-content.active[id$="-prev"] ~ .refresh-btn {
    display: flex;
}

.refresh-btn:hover { color: var(--neon); }
.refresh-btn:hover svg { transform: rotate(45deg); }
.refresh-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.lc-engine-tag {
    position: absolute;
    bottom: -8px;
    right: 7px;
    z-index: 100;
    background: var(--bg);
    color: #bbbbbb;
    font-size: 0.55rem;
    padding: 2px 4px;
    font-family: sans-serif;
}

/* Compact embed mode for homepage iframe preview */
html.lc-embed,
html.lc-embed body {
    overflow: hidden;
    height: 100%;
    min-height: 0;
    margin: 0;
}

html.lc-embed .lc-page {
    min-height: 0;
    height: 100%;
}

html.lc-embed .lc-header,
html.lc-embed .lc-footer {
    display: none;
}

html.lc-embed .lc-main,
html.lc-embed .animations-wrapper {
    max-width: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

html.lc-embed .grid-layout-triple {
    display: block;
    padding: 0;
    margin: 0;
    height: 100%;
}

html.lc-embed .anim-preview-card {
    height: 100%;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
}

html.lc-embed .showcase-body {
    height: auto;
    flex: 1 1 auto;
    min-height: 10rem;
}

html.lc-embed .showcase-footer {
    padding: 8px 12px;
    justify-content: flex-end;
}

html.lc-embed .showcase-footer .footer-left {
    display: none;
}

html.lc-embed .lc-engine-tag {
    display: none;
}

html.lc-embed .showcase-header {
    padding: 8px 12px;
}

html.lc-embed .tab {
    font-size: 0.68rem;
    padding: 4px 6px;
}

html.lc-embed .copy-btn {
    padding: 4px 10px;
    font-size: 0.68rem;
}
