/* style.css - Paste Prompt Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --transition-speed: 0.3s;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --font-sans: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-serif: 'Instrument Serif', serif;
}

/* Theme variables */
:root[data-theme="dark"] {
    --bg-base: #07090e;
    --bg-surface: #0f1319;
    --bg-surface-hover: #171d27;
    --border-color: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --badge-pro: #f59e0b;
    --badge-free: #10b981;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

:root[data-theme="light"] {
    --bg-base: #f9fafb;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f3f4f6;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --accent: #4f46e5;
    --accent-hover: #6366f1;
    --accent-glow: rgba(79, 70, 229, 0.08);
    --badge-pro: #d97706;
    --badge-free: #059669;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

:root[data-theme="peach"] {
    --bg-base: #fffbf9;
    --bg-surface: #fff1eb;
    --bg-surface-hover: #ffe5da;
    --border-color: #ffd2c1;
    --text-primary: #43281c;
    --text-secondary: #7f5539;
    --text-muted: #b89c8d;
    --accent: #e76f51;
    --accent-hover: #f4a261;
    --accent-glow: rgba(231, 111, 81, 0.12);
    --badge-pro: #d62828;
    --badge-free: #2a9d8f;
    --shadow: 0 10px 30px -10px rgba(231, 111, 81, 0.1);
}

:root[data-theme="lime-avocado"] {
    --bg-base: #0a0f0b;
    --bg-surface: #111a13;
    --bg-surface-hover: #19271c;
    --border-color: #233728;
    --text-primary: #f2faf4;
    --text-secondary: #9cbca4;
    --text-muted: #64826b;
    --accent: #84cc16; /* Lime Green */
    --accent-hover: #a3e635;
    --accent-glow: rgba(132, 204, 22, 0.15);
    --badge-pro: #f59e0b;
    --badge-free: #84cc16;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}


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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    color: inherit;
}

/* App Layout Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header.site-header {
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(var(--bg-base), 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: border-color var(--transition-speed);
}

.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Theme Picker */
.theme-picker {
    display: flex;
    background: var(--bg-surface-hover);
    padding: 4px;
    border-radius: 99px;
    border: 1px solid var(--border-color);
}

.theme-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.theme-btn.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Hero Section */
.hero {
    padding: 80px 0 60px 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero h1 span.serif {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    display: inline-block;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Search and Filters Bar */
.search-filter-section {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box-wrap {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px 16px 50px;
    font-size: 1.05rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.category-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cat-pill {
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.cat-pill:hover, .cat-pill.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.license-toggle-wrap {
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 99px;
}

.license-btn {
    border: none;
    background: transparent;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.license-btn.active {
    background: var(--accent);
    color: #ffffff;
}

/* Compact Titles-Only Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 80px;
}

/* Compact Prompt Card */
.prompt-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: var(--shadow);
    cursor: pointer;
    position: relative;
}

.prompt-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.card-tags {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-badge {
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    color: #ffffff;
}

.card-badge.pro {
    background-color: var(--badge-pro);
}

.card-badge.free {
    background-color: var(--badge-free);
}

/* Detail Layout */
.detail-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    padding: 40px 0 80px 0;
}

@media (max-width: 992px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

.detail-preview-container {
    background-color: #000;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-preview-container video, .detail-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-header {
    margin-bottom: 24px;
}

.detail-category-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-surface-hover);
    color: var(--accent);
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.detail-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.detail-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
}

.prompt-copy-container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 30px;
}

.prompt-copy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.prompt-copy-title {
    font-weight: 700;
    font-size: 1rem;
}

.prompt-area {
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-surface);
}

.btn-full {
    width: 100%;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--accent);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Admin Dashboard layout */
.admin-container {
    max-width: 1100px;
    margin: 60px auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.admin-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-label {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.admin-form-control {
    width: 100%;
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.admin-form-control:focus {
    border-color: var(--accent);
}

/* WYSIWYG editor style */
.wysiwyg-editor {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-base);
    overflow: hidden;
}

.wysiwyg-toolbar {
    background-color: var(--bg-surface-hover);
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

.wysiwyg-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
}

.wysiwyg-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.wysiwyg-content {
    padding: 16px;
    min-height: 120px;
    outline: none;
    color: var(--text-primary);
}

/* Tabs */
.admin-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.admin-tab {
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
}

.admin-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* Admin Table styling */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.admin-table th, .admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-weight: 700;
    color: var(--text-secondary);
}

.admin-table tr:hover {
    background-color: var(--bg-surface-hover);
}

/* Drag and drop sorting styling */
.sortable-item {
    padding: 16px;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    transition: background 0.2s, opacity 0.2s;
}

.sortable-item.dragging {
    opacity: 0.5;
    background: var(--bg-base);
    border-style: dashed;
}

.sort-handle {
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: grab;
}

/* Access Log table scroll */
.log-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

/* Footer */
footer.site-footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: border-color var(--transition-speed), background-color var(--transition-speed);
}
