/* PromptG – AI Prompt Gallery */
/* Glassmorphism + Dark Mode + Responsive Design */

:root {
    --bg-primary: #0b0f16;
    --bg-secondary: #111820;
    --glass-light: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-cyan: #00BFFF;
    --neon-cyan-glow: rgba(0, 191, 255, 0.5);
    --text-primary: #f4f8ff;
    --text-secondary: #a0aec0;
    --border-radius: 16px;
    --blur-effect: 18px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ==================== HEADER & NAVIGATION ==================== */
header {
    background: linear-gradient(135deg, rgba(11, 15, 22, 0.95), rgba(17, 24, 32, 0.95));
    backdrop-filter: blur(var(--blur-effect));
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 191, 255, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--neon-cyan), #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo svg {
    width: 28px;
    height: 28px;
    stroke: var(--neon-cyan);
}

.nav-center {
    flex: 1;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.nav-center a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-center a:hover {
    color: var(--neon-cyan);
}

.nav-center a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-cyan);
    transition: var(--transition);
}

.nav-center a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.language-switch {
    background: var(--glass-light);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.875rem;
}

.language-switch:hover {
    background: rgba(0, 191, 255, 0.1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan-glow);
}

.admin-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.admin-link:hover {
    color: var(--neon-cyan);
}

/* ==================== SEARCH BAR ==================== */
.search-container {
    max-width: 1400px;
    margin: 3rem auto 2rem;
    padding: 0 2rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    background: var(--glass-light);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    backdrop-filter: blur(var(--blur-effect));
    transition: var(--transition);
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 30px var(--neon-cyan-glow);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-box svg {
    width: 24px;
    height: 24px;
    stroke: var(--neon-cyan);
    flex-shrink: 0;
}

/* ==================== CATEGORY BAR ==================== */
.category-bar {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
}

.category-bar::-webkit-scrollbar {
    height: 4px;
}

.category-bar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.category-bar::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 10px;
}

.category-list {
    display: flex;
    gap: 1rem;
    white-space: nowrap;
}

.category-btn {
    background: var(--glass-light);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.category-btn:hover,
.category-btn.active {
    background: rgba(0, 191, 255, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan-glow);
    color: var(--neon-cyan);
}

/* ==================== MAIN CONTENT ==================== */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--neon-cyan), #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== PROMPT GRID ==================== */
.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .prompt-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .prompt-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .prompt-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* ==================== PROMPT CARD ==================== */
.prompt-card {
    background: var(--glass-light);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(var(--blur-effect));
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.prompt-card:hover {
    transform: scale(1.05);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 40px var(--neon-cyan-glow), inset 0 0 20px rgba(0, 191, 255, 0.1);
}

.prompt-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.1), rgba(0, 212, 255, 0.1));
}

.prompt-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.prompt-card-engine {
    font-size: 0.875rem;
    color: var(--neon-cyan);
    font-weight: 600;
    margin-bottom: 1rem;
}

.prompt-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.category-tag {
    background: rgba(0, 191, 255, 0.15);
    color: var(--neon-cyan);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(0, 191, 255, 0.3);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}

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

.modal-content {
    background: var(--glass-light);
    border: 2px solid var(--neon-cyan);
    border-radius: var(--border-radius);
    backdrop-filter: blur(var(--blur-effect));
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 60px var(--neon-cyan-glow);
    animation: slideUp 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 191, 255, 0.2);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--neon-cyan);
    color: var(--bg-primary);
}

.modal-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

.modal-body {
    padding: 2rem;
}

.modal-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.modal-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.modal-meta-item {
    display: flex;
    flex-direction: column;
}

.modal-meta-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.modal-meta-value {
    font-size: 1rem;
    color: var(--neon-cyan);
    font-weight: 700;
}

.modal-prompt {
    background: rgba(0, 191, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.modal-prompt-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.modal-prompt-text {
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 1rem;
    word-break: break-word;
}

.copy-button {
    background: linear-gradient(135deg, var(--neon-cyan), #00d4ff);
    color: var(--bg-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.copy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--neon-cyan-glow);
}

.copy-button:active {
    transform: translateY(0);
}

.modal-images {
    margin-top: 2rem;
}

.modal-images-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.modal-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.modal-image-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition);
}

.modal-image-thumb:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan-glow);
}

.modal-categories {
    margin-top: 1.5rem;
}

.modal-categories-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.modal-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.modal-category-tag {
    background: rgba(0, 191, 255, 0.2);
    color: var(--neon-cyan);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--neon-cyan);
}

/* ==================== FOOTER ==================== */
footer {
    background: linear-gradient(135deg, rgba(11, 15, 22, 0.95), rgba(17, 24, 32, 0.95));
    border-top: 1px solid var(--glass-border);
    padding: 2rem;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-secondary);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--neon-cyan);
}

.footer-text {
    font-size: 0.875rem;
}

/* ==================== ADMIN PANEL ==================== */
.admin-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 0;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--glass-light);
    border-right: 1px solid var(--glass-border);
    padding: 2rem 0;
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
}

.admin-main {
    margin-left: 250px;
    padding: 2rem;
}

.admin-nav-item {
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: rgba(0, 191, 255, 0.15);
    color: var(--neon-cyan);
    border-left: 3px solid var(--neon-cyan);
    padding-left: calc(1.5rem - 3px);
}

.admin-nav-item svg {
    width: 20px;
    height: 20px;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: var(--glass-light);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px var(--neon-cyan-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-cyan), #00d4ff);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--neon-cyan-glow);
}

.btn-secondary {
    background: var(--glass-light);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-cyan);
}

.btn-danger {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
    border: 1px solid #ff3b30;
}

.btn-danger:hover {
    background: rgba(255, 59, 48, 0.3);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-center {
        flex-direction: column;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .admin-container {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding: 1rem 0;
    }

    .admin-main {
        margin-left: 0;
        padding: 1rem;
    }

    .admin-nav-item {
        display: inline-block;
        padding: 0.75rem 1rem;
    }

    .modal-content {
        max-width: 95%;
    }

    .modal-image {
        height: 250px;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-meta {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .search-box {
        padding: 0.75rem 1rem;
    }

    .category-list {
        gap: 0.5rem;
    }

    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .prompt-grid {
        gap: 1rem;
    }

    .prompt-card-content {
        padding: 1rem;
    }

    .modal-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .modal-image-thumb {
        height: 100px;
    }
}

/* ==================== LOADING & ANIMATIONS ==================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-results h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* ==================== UTILITY CLASSES ==================== */
.hidden {
    display: none !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
