/* ============================================================
   PROMPTVAULT — Premium UI
   ============================================================ */

/* ── Variables ── */
:root {
    --bg:             #060612;
    --surface:        rgba(255,255,255,0.04);
    --surface-hover:  rgba(255,255,255,0.08);
    --border:         rgba(255,255,255,0.08);
    --border-hover:   rgba(139,92,246,0.5);

    --purple:         #8b5cf6;
    --blue:           #3b82f6;
    --cyan:           #06b6d4;
    --pink:           #ec4899;
    --green:          #10b981;

    --text-1: #f8fafc;
    --text-2: #94a3b8;
    --text-3: #475569;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
    --transition-spring: 0.5s cubic-bezier(0.175,0.885,0.32,1.275);

    --font: 'Inter', sans-serif;
}

/* ── Reset ── */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-1);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Canvas Particles ── */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── Aurora Blobs ── */
.aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: blobFloat 20s ease-in-out infinite;
}
.aurora-blob-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--purple), transparent 70%);
    top: -15%; left: -10%;
    animation-duration: 22s;
}
.aurora-blob-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--blue), transparent 70%);
    top: 20%; right: -10%;
    animation-duration: 18s;
    animation-delay: -7s;
}
.aurora-blob-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--pink), transparent 70%);
    bottom: 10%; left: 30%;
    animation-duration: 25s;
    animation-delay: -12s;
}
@keyframes blobFloat {
    0%,100% { transform: translate(0,0) scale(1); }
    25%      { transform: translate(40px,-40px) scale(1.05); }
    50%      { transform: translate(-20px,60px) scale(0.95); }
    75%      { transform: translate(60px,20px) scale(1.1); }
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 0 24px;
    transition: var(--transition);
}
.navbar.scrolled {
    background: rgba(6,6,18,0.85);
    backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-1);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}
.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    box-shadow: 0 0 20px rgba(139,92,246,0.4);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--text-1); }
.nav-cta {
    background: linear-gradient(135deg, var(--purple), var(--blue)) !important;
    color: white !important;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: transform var(--transition), box-shadow var(--transition) !important;
}
.nav-cta:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 24px rgba(139,92,246,0.35) !important;
}
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text-2);
    border-radius: 2px;
    transition: var(--transition);
}

/* ── Hero ── */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.25);
    color: #c4b5fd;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 28px;
    animation: fadeSlideDown 0.8s ease both;
}
.badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--purple);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { opacity:1; transform: scale(1); }
    50%      { opacity:0.4; transform: scale(0.8); }
}

/* Hero Title */
.hero-title {
    display: flex;
    flex-direction: column;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
}
.hero-title .line {
    display: block;
    animation: fadeSlideUp 0.8s ease both;
}
.hero-title .line:nth-child(1) { animation-delay: 0.1s; }
.hero-title .line:nth-child(2) { animation-delay: 0.2s; }

.gradient-text {
    background: linear-gradient(135deg, var(--purple) 0%, var(--cyan) 50%, var(--pink) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}
@keyframes gradientShift {
    0%,100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-2);
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 48px;
    animation: fadeSlideUp 0.8s ease 0.3s both;
}

/* Search */
.search-wrapper {
    width: 100%;
    max-width: 600px;
    margin-bottom: 48px;
    animation: fadeSlideUp 0.8s ease 0.4s both;
}
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.search-box i {
    position: absolute;
    left: 20px;
    color: var(--text-3);
    font-size: 1rem;
    z-index: 2;
    transition: color var(--transition);
}
#searchInput {
    width: 100%;
    padding: 18px 20px 18px 52px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-1);
    font-size: 1rem;
    font-family: var(--font);
    backdrop-filter: blur(12px);
    transition: all var(--transition);
    outline: none;
}
#searchInput::placeholder { color: var(--text-3); }
#searchInput:focus {
    border-color: var(--purple);
    background: rgba(139,92,246,0.06);
    box-shadow: 0 0 0 4px rgba(139,92,246,0.12), 0 0 40px rgba(139,92,246,0.12);
}
#searchInput:focus + .search-glow { opacity: 1; }
#searchInput:focus ~ i, .search-box:focus-within i { color: var(--purple); }
.search-glow {
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--purple), var(--blue));
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition);
    filter: blur(20px);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
    animation: fadeSlideUp 0.8s ease 0.5s both;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat strong {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-1), var(--text-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat span {
    font-size: 0.75rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}
.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* ── Filters ── */
.filters-section {
    position: relative;
    z-index: 1;
    padding: 0 24px 40px;
}
.filters-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.filter-pill:hover {
    background: var(--surface-hover);
    color: var(--text-1);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}
.filter-pill.active {
    background: linear-gradient(135deg, var(--purple), var(--blue));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(139,92,246,0.3);
}

/* ── Results Bar ── */
.results-bar {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto 32px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
#resultsCount {
    font-size: 0.8rem;
    color: var(--text-3);
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.results-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Grid ── */
.grid-section {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 120px;
}
.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* ── Prompt Card ── */
.prompt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px);
    animation: cardReveal 0.5s ease forwards;
}
.prompt-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 0;
    border-radius: inherit;
}
.prompt-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: var(--border-hover);
    box-shadow:
        0 0 0 1px rgba(139,92,246,0.2),
        0 20px 60px rgba(0,0,0,0.5),
        0 0 40px rgba(139,92,246,0.1);
}
.prompt-card:hover::before { opacity: 0.05; }
.prompt-card > * { position: relative; z-index: 1; }

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

.card-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 9px;
    border-radius: 6px;
    width: fit-content;
}

/* Category colours */
.tag-coding     { background: rgba(59,130,246,0.15);  color: #93c5fd; }
.tag-marketing  { background: rgba(245,158,11,0.15);  color: #fcd34d; }
.tag-design     { background: rgba(236,72,153,0.15);  color: #f9a8d4; }
.tag-writing    { background: rgba(139,92,246,0.15);  color: #c4b5fd; }
.tag-productivity { background: rgba(6,182,212,0.15); color: #67e8f9; }
.tag-socialmedia { background: rgba(249,115,22,0.15); color: #fed7aa; }
.tag-business   { background: rgba(16,185,129,0.15);  color: #6ee7b7; }
.tag-education  { background: rgba(239,68,68,0.15);   color: #fca5a5; }

.card-title {
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text-1);
}
.card-desc {
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.6;
    flex: 1;
}
.card-preview {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-3);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}
.card-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--purple);
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.2);
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font);
    transition: all var(--transition);
}
.card-copy-btn:hover {
    background: rgba(139,92,246,0.2);
    border-color: var(--purple);
    box-shadow: 0 0 16px rgba(139,92,246,0.2);
}
.card-copy-btn.copied {
    background: rgba(16,185,129,0.15);
    border-color: var(--green);
    color: var(--green);
}
.card-expand {
    font-size: 0.78rem;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition);
}
.prompt-card:hover .card-expand { color: var(--text-2); }

/* ── No Results ── */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-3);
}
.no-results i { font-size: 3rem; margin-bottom: 16px; display: block; }
.no-results h3 { font-size: 1.2rem; color: var(--text-2); margin-bottom: 8px; }

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}
.modal {
    background: #0e0e1e;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-spring);
    box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.05);
}
.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
}
.modal-close {
    position: absolute;
    top: 20px; right: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    width: 36px; height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition);
}
.modal-close:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.3);
    color: #fca5a5;
}
.modal-category {
    margin-bottom: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.modal-title {
    font-size: 1.6rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    line-height: 1.2;
}
.modal-desc {
    color: var(--text-2);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.6;
}
.modal-prompt-box {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}
.modal-prompt-text {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}
.modal-copy-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}
.modal-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139,92,246,0.4);
}
.modal-copy-btn.copied {
    background: linear-gradient(135deg, var(--green), #059669);
    box-shadow: 0 4px 20px rgba(16,185,129,0.3);
}

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--green);
    color: white;
    padding: 12px 22px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(16,185,129,0.4);
    transition: transform var(--transition-spring), opacity var(--transition);
    opacity: 0;
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Footer ── */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 60px 24px;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}
.footer-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 8px;
}
.footer-logo i { color: var(--purple); }
.footer-tagline {
    color: var(--text-3);
    font-size: 0.875rem;
    margin-bottom: 24px;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}
.footer-links a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--purple); }
.footer-copy {
    color: var(--text-3);
    font-size: 0.8rem;
}

/* ── Keyframes ── */
@keyframes fadeSlideDown {
    from { opacity:0; transform:translateY(-16px); }
    to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeSlideUp {
    from { opacity:0; transform:translateY(24px); }
    to   { opacity:1; transform:translateY(0); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .hero-title { font-size: clamp(2.5rem, 12vw, 4rem); }
    .hero-stats { gap: 20px; }
    .stat strong { font-size: 1.2rem; }
    .prompt-grid { grid-template-columns: 1fr; }
    .modal { padding: 28px 20px; }
    .modal-title { font-size: 1.3rem; }
}
@media (max-width: 480px) {
    .hero-stats { flex-direction: column; gap: 8px; }
    .stat-divider { width: 32px; height: 1px; }
    .filters-wrapper { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
}
