/* Premium Dark Theme Variables */
:root {
    /* Colors */
    --bg-base: #0a0a0c;
    --bg-surface: #131317;
    --bg-surface-elevated: #1e1e24;
    --bg-glass: rgba(25, 25, 30, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);

    --accent-orange: #ff5e00;
    --accent-orange-glow: rgba(255, 94, 0, 0.5);
    --accent-cyan: #00d9ff;
    --accent-cyan-glow: rgba(0, 217, 255, 0.3);

    --text-primary: #f8f8f9;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', 'Consolas', monospace;

    /* Spacing & Effects */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    --shadow-glow: 0 0 20px var(--accent-orange-glow);
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

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

/* Hero Section */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 2rem;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-bg-img.loaded {
    opacity: 0.4;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--accent-orange-glow) 0%, transparent 70%);
    opacity: 0.4;
    filter: blur(50px);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, var(--bg-base) 0%, transparent 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
    animation: fadeUp 1s ease forwards;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    color: var(--accent-cyan);
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-title span {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-primary);
    background: linear-gradient(135deg, var(--accent-orange), #ff9100);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Layout */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 50vh;
}

/* Content Area inside App Container */
.content-area {
    width: 100%;
}

.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb span {
    cursor: pointer;
    transition: color 0.2s;
}

.breadcrumb span:hover {
    color: var(--accent-orange);
}

.breadcrumb .separator {
    font-size: 0.8rem;
    color: var(--border-glass);
}

.breadcrumb .active-crumb {
    color: var(--text-primary);
    font-weight: 500;
}

/* View Sections (SPA behavior) */
.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
}

/* Grid System */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 94, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at top left, rgba(255, 255, 255, 0.05), transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.card-img {
    height: 160px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    z-index: 2;
    background: linear-gradient(to top, var(--bg-surface) 60%, transparent);
    margin-top: -30px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Rich Content (Markdown Area) */
.rich-content {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.rich-content h1,
.rich-content h2,
.rich-content h3 {
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.rich-content p {
    margin-bottom: 1.2rem;
}

.rich-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.rich-content li {
    margin-bottom: 0.5rem;
}

/* Hints Section */
.hints-list {
    margin-bottom: 2.5rem;
}

.hints-container {
    background: rgba(255, 143, 64, 0.05);
    border-left: 4px solid var(--accent-orange);
    padding: 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-top: 2rem;
}

.hints-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--accent-orange);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hints-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hints-container li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.hints-container li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-orange);
    font-weight: bold;
}

.hints-container li b,
.hints-container li strong {
    color: var(--text-primary);
}

/* Subcategory Cards */
.subcat-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
}

/* Prompts List */
.prompts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
}

.prompt-group-title {
    grid-column: 1 / -1;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 3rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-glass);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.prompt-block {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prompt-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-cyan);
}

.prompt-image {
    width: 100%;
    overflow: hidden;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-glass);
}

.prompt-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.prompt-block:hover .prompt-image img {
    transform: scale(1.02);
}

.prompt-header {
    background: var(--bg-surface-elevated);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

.prompt-title {
    font-size: 0.95rem;
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 0;
}

.btn-copy {
    background: var(--accent-orange);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: #e65500;
}

.btn-copy.copied {
    background: #10b981;
    /* Success green */
}

/* Markdown Context */
.prompt-content {
    padding: 1rem;
    background: #0d1117;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.prompt-content pre {
    margin: 0;
}

.prompt-content code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    color: #abb2bf;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Toast */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-surface-elevated);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.toast.show {
    bottom: 30px;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-glass);
    margin-top: 4rem;
}

.footer-content p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.footer-tagline {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Sidebar Skeleton (for initial load) */
.sidebar {
    display: none;
    /* Hidden in this simple MVP non-nav layout */
}

.skeleton-card {
    height: 250px;
    background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-surface-elevated) 50%, var(--bg-surface) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .grid-container,
    .prompts-list {
        grid-template-columns: 1fr;
    }

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

    .btn-copy {
        justify-content: center;
        width: 100%;
    }
}
