/* Base Styles & CSS Variables */
:root {
    --bg-primary: #080818;
    --bg-secondary: #0f0f24;
    --bg-tertiary: #181836;
    --text-primary: #ffffff;
    --text-secondary: #b8b8d0;
    --text-tertiary: #6c6c8c;
    --accent-color: #5c4dff;
    --accent-light: #7a6fff;
    --accent-dark: #4a3fe0;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.3);
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --transition-speed: 0.3s;
    --font-main: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Courier New', monospace;
    --glow-effect: 0 0 15px rgba(92, 77, 255, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--accent-light);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

button {
    cursor: pointer;
    font-family: var(--font-main);
}

ul {
    list-style: none;
}

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

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    border: none;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    gap: 8px;
}

.btn svg {
    width: 18px;
    height: 18px;
}

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

.btn-primary:hover {
    background-color: var(--accent-light);
    box-shadow: var(--glow-effect);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: rgba(92, 77, 255, 0.1);
    color: var(--accent-light);
    border-color: var(--accent-light);
}

/* Header Styles */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(8, 8, 24, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-svg {
    height: 40px;
    width: auto;
}

.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-bar {
    display: flex;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-speed) ease;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 2px var(--accent-color);
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    background-color: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
}

.search-bar button {
    background-color: var(--accent-color);
    border: none;
    color: white;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed) ease;
}

.search-bar button:hover {
    background-color: var(--accent-light);
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(1);
    transition: transform var(--transition-speed) ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: transform var(--transition-speed) ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(160deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, var(--accent-dark) 0%, transparent 70%);
    opacity: 0.1;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.accent {
    color: var(--accent-color);
    position: relative;
}

.accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(transparent, rgba(92, 77, 255, 0.2));
    z-index: -1;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

/* Section Styles */
section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* Filter Controls */
.filter-controls {
    position: relative;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    transition: background-color var(--transition-speed) ease;
}

.filter-toggle:hover {
    background-color: var(--bg-secondary);
}

.filter-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    padding: 20px;
    width: 280px;
    box-shadow: var(--shadow-md);
    z-index: 10;
    display: none;
    animation: fadeIn 0.3s ease;
}

.filter-panel.active {
    display: block;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: var(--text-secondary);
}

.filter-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-speed) ease;
}

.filter-options label:hover {
    color: var(--text-primary);
}

.filter-options input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background-color: var(--bg-primary);
    border-radius: 4px;
    border: 2px solid var(--text-tertiary);
    position: relative;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.filter-options input[type="checkbox"]:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.filter-options input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-panel .btn {
    width: 100%;
    margin-top: 10px;
}

/* Prompt Grid */
.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.prompt-card {
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    cursor: pointer;
    position: relative;
}

.prompt-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.prompt-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.prompt-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.prompt-card-meta {
    display: flex;
    gap: 15px;
    color: var(--text-tertiary);
    font-size: 14px;
    align-items: center;
}

.prompt-card-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.prompt-card-body {
    padding: 20px;
}

.prompt-card-content {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prompt-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tag {
    background-color: rgba(92, 77, 255, 0.15);
    color: var(--accent-light);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
    transition: background-color var(--transition-speed) ease;
}

.tag:hover {
    background-color: rgba(92, 77, 255, 0.25);
}

.prompt-card-footer {
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
}

.prompt-card-stats {
    display: flex;
    gap: 15px;
    color: var(--text-tertiary);
    font-size: 14px;
}

.prompt-card-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.prompt-card-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 50%;
    transition: all var(--transition-speed) ease;
}

.action-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.action-btn svg {
    width: 20px;
    height: 20px;
}

/* Categories Section */
.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.category-card {
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    padding: 25px 20px;
    text-align: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    color: var(--text-primary);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background-color: var(--bg-secondary);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.category-card h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.category-card p {
    color: var(--text-tertiary);
    font-size: 14px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s forwards;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: var(--bg-secondary);
    z-index: 1;
}

.modal-header h2 {
    font-size: 1.6rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 5px;
    transition: all var(--transition-speed) ease;
}

.close-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 20px;
}

.prompt-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--text-tertiary);
    font-size: 14px;
}

.prompt-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.prompt-content {
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    margin-bottom: 20px;
    white-space: pre-wrap;
    font-family: var(--font-mono);
    line-height: 1.5;
    color: var(--text-secondary);
}

.prompt-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Footer Styles */
.main-footer {
    background-color: var(--bg-secondary);
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo p {
    margin-top: 10px;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 8px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--text-tertiary);
    transition: color var(--transition-speed) ease;
}

.footer-section a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    font-size: 14px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes glowEffect {
    0% {
        box-shadow: 0 0 5px rgba(92, 77, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(92, 77, 255, 0.5);
    }
    100% {
        box-shadow: 0 0 5px rgba(92, 77, 255, 0.3);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-accent {
    color: var(--accent-color);
}

.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-error {
    color: var(--error-color);
}

.copy-success-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.show-notification {
    animation: fadeIn 0.3s ease-in, fadeOut 0.3s 2s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
