/* --- Promptora Global Styles & Variables --- */
:root {
    --primary-color: #5c189b;
    --accent-color: #8a3ffb;
    --text-color-light: #ffffff;
    --text-color-medium: #cccccc;
    --bg-color-dark: #100a1c;
    --card-bg: #1a0f2b;
    --font-family: 'Poppins', 'Arial', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-color-light);
    background-color: var(--bg-color-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(92, 24, 155, 0.3) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(138, 63, 251, 0.2) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(92, 24, 155, 0.3) 0px, transparent 50%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Particles Background */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

body::before {
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(138, 63, 251, 0.4), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(92, 24, 155, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(138, 63, 251, 0.5), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(196, 94, 255, 0.4), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(138, 63, 251, 0.3), transparent),
        radial-gradient(1px 1px at 33% 80%, rgba(92, 24, 155, 0.4), transparent),
        radial-gradient(1px 1px at 15% 90%, rgba(138, 63, 251, 0.3), transparent);
    background-size: 200% 200%;
    animation: particles-float 20s ease-in-out infinite;
    opacity: 0.6;
}

body::after {
    background-image: 
        radial-gradient(1px 1px at 40% 20%, rgba(138, 63, 251, 0.3), transparent),
        radial-gradient(2px 2px at 75% 45%, rgba(92, 24, 155, 0.4), transparent),
        radial-gradient(1px 1px at 25% 60%, rgba(196, 94, 255, 0.3), transparent),
        radial-gradient(1px 1px at 90% 85%, rgba(138, 63, 251, 0.4), transparent),
        radial-gradient(2px 2px at 10% 40%, rgba(92, 24, 155, 0.3), transparent),
        radial-gradient(1px 1px at 65% 15%, rgba(138, 63, 251, 0.5), transparent);
    background-size: 200% 200%;
    animation: particles-float 25s ease-in-out infinite reverse;
    opacity: 0.5;
}

@keyframes particles-float {
    0%, 100% {
        background-position: 0% 0%;
        opacity: 0.5;
    }
    25% {
        background-position: 50% 25%;
        opacity: 0.7;
    }
    50% {
        background-position: 100% 50%;
        opacity: 0.6;
    }
    75% {
        background-position: 50% 75%;
        opacity: 0.8;
    }
}

/* Floating Particles Container */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Individual Particles */
.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(138, 63, 251, 0.6), transparent);
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Particle Sizes and Animations */
.particle:nth-child(1) {
    width: 3px;
    height: 3px;
    top: 10%;
    left: 10%;
    animation: float-up 15s infinite ease-in-out;
}

.particle:nth-child(2) {
    width: 5px;
    height: 5px;
    top: 20%;
    left: 80%;
    animation: float-up 18s infinite ease-in-out 2s;
}

.particle:nth-child(3) {
    width: 2px;
    height: 2px;
    top: 60%;
    left: 20%;
    animation: float-up 20s infinite ease-in-out 4s;
}

.particle:nth-child(4) {
    width: 4px;
    height: 4px;
    top: 40%;
    left: 60%;
    animation: float-up 22s infinite ease-in-out 1s;
}

.particle:nth-child(5) {
    width: 3px;
    height: 3px;
    top: 80%;
    left: 40%;
    animation: float-up 17s infinite ease-in-out 3s;
}

.particle:nth-child(6) {
    width: 2px;
    height: 2px;
    top: 30%;
    left: 90%;
    animation: float-up 19s infinite ease-in-out 5s;
}

.particle:nth-child(7) {
    width: 4px;
    height: 4px;
    top: 70%;
    left: 70%;
    animation: float-up 21s infinite ease-in-out 2.5s;
}

.particle:nth-child(8) {
    width: 3px;
    height: 3px;
    top: 50%;
    left: 15%;
    animation: float-up 16s infinite ease-in-out 4.5s;
}

.particle:nth-child(9) {
    width: 5px;
    height: 5px;
    top: 15%;
    left: 50%;
    animation: float-up 23s infinite ease-in-out 1.5s;
}

.particle:nth-child(10) {
    width: 2px;
    height: 2px;
    top: 90%;
    left: 85%;
    animation: float-up 18s infinite ease-in-out 3.5s;
}

/* Float Up Animation */
@keyframes float-up {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    50% {
        transform: translateY(-500px) translateX(100px) scale(1.2);
        opacity: 0.8;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-1000px) translateX(-100px) scale(0.8);
        opacity: 0;
    }
}

/* Disable particles on low-performance devices */
@media (prefers-reduced-motion: reduce) {
    .particles-bg,
    body::before,
    body::after {
        animation: none !important;
    }
}

/* Disable on very small screens for performance */
@media (max-width: 480px) {
    .particle {
        display: none;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* --- Sticky Navbar Styling --- */
#mainNavbar {
    background: linear-gradient(135deg, rgba(26, 15, 43, 0.95), rgba(16, 10, 28, 0.98)) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(138, 63, 251, 0.2);
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

#mainNavbar.scrolled {
    padding: 5px 0;
    box-shadow: 0 4px 30px rgba(138, 63, 251, 0.3);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--text-color-light) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--accent-color));
    transition: var(--transition);
}

.navbar-brand:hover .navbar-logo {
    filter: drop-shadow(0 0 15px var(--accent-color));
}

.navbar-title {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), #c45eff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-nav .nav-link {
    color: var(--text-color-medium) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    margin: 0 5px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    background: rgba(138, 63, 251, 0.1);
}

.navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
    background: rgba(138, 63, 251, 0.15);
}

.navbar-toggler {
    border-color: var(--accent-color) !important;
    transition: var(--transition);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(138, 63, 251, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(138, 63, 251, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile navbar */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(26, 15, 43, 0.98);
        padding: 20px;
        border-radius: 12px;
        margin-top: 10px;
        border: 1px solid rgba(138, 63, 251, 0.2);
    }
    
    .navbar-nav {
        gap: 5px;
    }
    
    .navbar-nav .nav-link {
        padding: 12px 16px !important;
    }
}

/* --- Old Header Styling (Deprecated - keeping for backwards compatibility) --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--accent-color));
}

.logo-container h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--accent-color), #c45eff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.website-url {
    font-size: 0.9rem;
    color: var(--text-color-medium);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-color-medium);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.admin-link {
    padding: 8px 20px;
    background: rgba(138, 63, 251, 0.2);
    border: 1px solid var(--accent-color);
    border-radius: 20px;
}

.admin-link:hover {
    background: var(--accent-color);
    color: var(--text-color-light) !important;
}

/* --- Hero Section --- */
.hero-section {
    max-width: 1400px;
    margin: 40px auto;
    text-align: center;
    padding: 60px 20px;
}

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

.hero-title .highlight {
    background: linear-gradient(135deg, var(--accent-color), #c45eff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* --- Search Section --- */
.search-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.search-container {
    background: var(--card-bg);
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 0 30px rgba(138, 63, 251, 0.3);
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    background: #b590ff;
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    color: var(--text-color-light);
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(138, 63, 251, 0.5);
}

.search-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 1.2rem;
}

.filter-section select {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-color-dark);
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    color: var(--text-color-light);
    font-size: 1rem;
}

.filter-section select:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(138, 63, 251, 0.5);
}

/* --- Trending Section --- */
.trending-section {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
}

.section-title i {
    color: var(--accent-color);
    margin-right: 10px;
}

/* Sort Controls */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-label {
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-label i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.sort-dropdown {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    min-width: 180px;
}

.sort-dropdown:hover {
    border-color: var(--accent-color);
    background: rgba(139, 92, 246, 0.1);
}

.sort-dropdown:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.sort-dropdown option {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 10px;
}

.trending-card {
    position: relative;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.trending-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(138, 63, 251, 0.4);
}

.trending-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, var(--accent-color), #c45eff);
    color: var(--text-color-light);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 2;
}

/* 4:3 Aspect Ratio Container - No Cropping */
.trending-img-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 ratio = 3/4 = 0.75 = 75% */
    overflow: hidden;
    background: var(--card-bg);
}

.trending-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Show full image without cropping */
    transition: var(--transition);
}

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

.trending-overlay {
    position: relative;
    background: transparent;
    padding: 0;
    transform: translateY(0);
    transition: var(--transition);
}

/* Gradient Background for Text Content */
.trending-content-gradient {
    background: linear-gradient(
        to bottom, 
        rgba(16, 10, 28, 0) 0%,
        rgba(16, 10, 28, 0.7) 20%,
        rgba(26, 15, 43, 0.85) 40%,
        rgba(26, 15, 43, 0.95) 60%,
        rgba(16, 10, 28, 1) 100%
    );
    padding: 30px 20px 20px;
    margin-top: -80px; /* Overlap image for gradient effect */
    position: relative;
    z-index: 1;
}

.trending-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color-light);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.trending-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-color-medium);
}

.trending-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.trending-stats i {
    color: var(--accent-color);
}

/* --- Prompt Cards --- */
.prompts-section {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;
}

.prompt-card {
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
}

.prompt-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(138, 63, 251, 0.3);
}

.prompt-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.prompt-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.prompt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 10, 28, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.prompt-card:hover .prompt-overlay {
    opacity: 1;
}

.view-btn {
    background: var(--accent-color);
    color: var(--text-color-light);
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
}

.view-btn:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

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

.prompt-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color-light);
}

.prompt-preview {
    color: var(--text-color-medium);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

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

.tag {
    background: rgba(138, 63, 251, 0.2);
    color: var(--accent-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid var(--accent-color);
}

.tag-large {
    background: rgba(138, 63, 251, 0.2);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--accent-color);
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

.prompt-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid rgba(138, 63, 251, 0.2);
    font-size: 0.85rem;
}

.prompt-ai, .prompt-views {
    color: var(--text-color-medium);
}

.prompt-ai i, .prompt-views i {
    color: var(--accent-color);
    margin-right: 5px;
}

/* --- Prompt List Items (Compact View) --- */
.prompt-list-item {
    background: var(--card-bg);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(138, 63, 251, 0.3);
    transition: var(--transition);
    cursor: pointer;
}

.prompt-list-item:hover {
    border-color: var(--accent-color);
    background: rgba(138, 63, 251, 0.1);
    transform: translateX(5px);
}

.prompt-list-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--accent-color);
}

.prompt-list-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color-light);
    margin-bottom: 8px;
    margin-top: 5px;
}

.prompt-list-preview {
    font-size: 0.85rem;
    color: var(--text-color-medium);
    margin-bottom: 10px;
    line-height: 1.4;
}

.prompt-list-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-small {
    background: rgba(138, 63, 251, 0.2);
    color: var(--accent-color);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    border: 1px solid var(--accent-color);
}

/* Mobile AI Badge */
.prompt-list-mobile-ai {
    margin-top: 8px;
}

.prompt-list-mobile-ai .badge-sm {
    font-size: 0.75rem;
    padding: 5px 10px;
}

/* --- Ad Container Styles --- */
.ad-card-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: rgba(138, 63, 251, 0.05);
    border: 1px dashed var(--accent-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* Ad Card - 300x250 on desktop, 300x250 on mobile */
.ad-card-container #featured-ad-card {
    width: 300px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-list-container {
    width: 100%;
    min-height: 90px;
    background: rgba(138, 63, 251, 0.05);
    border: 1px dashed var(--accent-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
}

/* Ad List - 728x90 on desktop, 300x250 on mobile */
.ad-list-item {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .ad-list-container {
        min-height: 250px;
    }
    
    .ad-list-item {
        width: 300px;
        height: 250px;
    }
    
    /* Mobile list item improvements */
    .prompt-list-item {
        padding: 12px 15px;
    }
    
    .prompt-list-img {
        border-radius: 8px;
        border-width: 2px;
        aspect-ratio: 4 / 3;
    }
    
    .prompt-list-title {
        font-size: 1rem;
        margin-bottom: 8px;
        margin-top: 0;
        line-height: 1.4;
        font-weight: 600;
    }
    
    .prompt-list-mobile-ai {
        margin-top: 10px;
    }
    
    .prompt-list-mobile-ai .badge-sm {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* --- Sort Control --- */
.sort-control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 20px;
    gap: 10px;
}

.sort-control label {
    color: var(--text-color-medium);
    font-size: 0.9rem;
    font-weight: 500;
}

.sort-control select {
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    color: var(--text-color-light);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.sort-control select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(138, 63, 251, 0.5);
}

.sort-control select option {
    background: var(--card-bg);
    color: var(--text-color-light);
}

/* --- Pagination --- */
.pagination {
    margin-top: 40px;
}

.pagination .page-link {
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    color: var(--text-color-light);
    padding: 10px 18px;
    margin: 0 5px;
    border-radius: 8px;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-color-light);
}

.pagination .page-item.active .page-link {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-color-light);
}

.pagination .page-item.disabled .page-link {
    background: var(--card-bg);
    border-color: var(--text-color-medium);
    color: var(--text-color-medium);
    opacity: 0.5;
}

/* --- Prompt Detail Page --- */
.prompt-detail-section {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.prompt-image-large {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(138, 63, 251, 0.3);
}

.prompt-image-large img {
    width: 100%;
    height: auto;
    display: block;
}

.prompt-info {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid var(--accent-color);
}

.prompt-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color-light);
    margin-bottom: 20px;
}

.btn-copy {
    background: rgba(138, 63, 251, 0.2);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 10px 15px;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-copy:hover {
    background: var(--accent-color);
    color: var(--text-color-light);
}

.prompt-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.prompt-meta .badge {
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.prompt-text-container {
    margin-top: 20px;
}

.prompt-text-box {
    background: var(--bg-color-dark);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--accent-color);
    position: relative;
}

.prompt-text {
    color: var(--text-color-light);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 15px;
}

.btn-copy-full {
    width: 100%;
}

.share-section {
    margin-top: 30px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.share-buttons .btn {
    flex: 1;
    min-width: 120px;
}

/* --- Ad Container --- */
.ad-container {
    background: rgba(138, 63, 251, 0.05);
    border: 2px dashed var(--accent-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    min-height: 100px;
}

/* --- Footer --- */
.footer {
    background: var(--card-bg);
    border-top: 2px solid var(--accent-color);
    padding: 40px 20px 20px;
    margin-top: 80px;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-color-medium);
    transition: var(--transition);
}

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

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

/* --- Admin Styles --- */
.admin-container {
    max-width: 600px;
    margin: 100px auto;
    padding: 0 20px;
}

.admin-card {
    background: var(--card-bg);
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(138, 63, 251, 0.3);
}

.admin-header {
    text-align: center;
    margin-bottom: 30px;
}

.admin-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color-light);
}

.admin-header p {
    color: var(--text-color-medium);
    margin-top: 10px;
}

.form-label {
    color: var(--text-color-light);
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control, .form-select {
    background: var(--bg-color-dark);
    border: 1px solid var(--accent-color);
    color: var(--text-color-light);
    padding: 12px;
    border-radius: 8px;
}

.form-control:focus, .form-select:focus {
    background: var(--bg-color-dark);
    border-color: var(--accent-color);
    color: var(--text-color-light);
    box-shadow: 0 0 15px rgba(138, 63, 251, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #c45eff);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(138, 63, 251, 0.4);
}

.admin-panel-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.admin-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--accent-color);
}

.table {
    color: var(--text-color-light);
}

.table thead {
    background: var(--accent-color);
}

.table tbody tr {
    background: var(--card-bg);
    border-bottom: 1px solid rgba(138, 63, 251, 0.2);
}

.table tbody tr:hover {
    background: rgba(138, 63, 251, 0.1);
}

/* --- Error Page --- */
.error-container {
    max-width: 600px;
    margin: 100px auto;
    padding: 60px 20px;
    text-align: center;
}

.error-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color-light);
    margin-bottom: 20px;
}

.error-message {
    font-size: 1.2rem;
    color: var(--text-color-medium);
    margin-bottom: 30px;
}

/* --- Toast Notifications --- */
.toast-message {
    background: var(--card-bg);
    border: 2px solid var(--accent-color);
    color: var(--text-color-light);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(100%);
    transition: var(--transition);
}

.toast-message.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-color: #28a745;
}

.toast-error {
    border-color: #dc3545;
}

/* --- Lazy Load Image Effect --- */
img[data-src] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img.loaded {
    opacity: 1;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .sort-controls {
        width: 100%;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .sort-dropdown {
        flex: 1;
        min-width: 150px;
    }
    
    .sort-label {
        width: 100%;
        margin-top: 10px;
    }
    
    .sort-label:first-of-type {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }
    
    .website-url {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .trending-content-gradient {
        padding: 20px 15px 15px;
        margin-top: -60px; /* Adjust for mobile */
    }
    
    .trending-title {
        font-size: 1rem;
    }
    
    .prompt-detail-title {
        font-size: 1.8rem;
    }
    
    .share-buttons .btn {
        flex: 1 1 45%;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 30px 20px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .search-container {
        padding: 20px;
    }
    
    .trending-title {
        font-size: 1.1rem;
    }
    
    .prompt-card-body {
        padding: 15px;
    }
    
    .admin-card {
        padding: 25px;
    }
    
    /* Extra small mobile - larger image, title only */
    .prompt-list-item {
        padding: 15px;
    }
    
    .prompt-list-img {
        border-radius: 10px;
        aspect-ratio: 4 / 3;
    }
    
    .prompt-list-title {
        font-size: 1.05rem;
        font-weight: 700;
        margin-bottom: 10px;
    }
    
    .prompt-list-mobile-ai .badge-sm {
        font-size: 0.85rem;
        padding: 7px 14px;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
}

/* --- Loading Animation --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* --- Ad Container Styles --- */
.ad-container {
    margin: 20px auto;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    position: relative;
    overflow: hidden;
}

.ad-container.ad-loaded {
    background: transparent;
}

/* Ad Placeholder Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.ad-placeholder {
    animation: shimmer 1.5s infinite;
    will-change: background-position;
}

/* Ad Content Wrapper */
.ad-content {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Smooth fade-in for loaded ads */
.ad-container iframe {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.ad-container iframe:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 63, 251, 0.3);
}

/* Ad Loading Spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.ad-loading-text::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(138, 63, 251, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Responsive Ad Containers */
@media (max-width: 768px) {
    .ad-container {
        margin: 15px auto;
        min-height: 60px;
    }
    
    .ad-placeholder {
        max-width: 100%;
        height: auto !important;
        aspect-ratio: 728/90; /* Maintain aspect ratio */
    }
    
    /* Skyscraper ad on mobile */
    #ad-skyscraper {
        display: flex !important;
        margin: 20px auto;
    }
    
    #ad-skyscraper .ad-placeholder {
        aspect-ratio: 160/600; /* Skyscraper aspect ratio */
        max-width: 160px;
    }
}

/* Hide skyscraper on desktop */
@media (min-width: 769px) {
    #ad-skyscraper {
        display: none !important;
    }
}

/* Ad Error State */
.ad-error {
    font-family: var(--font-family);
}

/* Preload optimization */
.ad-container::before {
    content: '';
    display: none;
}

/* --- In-Feed Ad Card Styles --- */
.infeed-ad-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(138, 63, 251, 0.2);
    transition: var(--transition);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    position: relative;
}

.infeed-ad-card::before {
    content: 'Advertisement';
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 1;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 8px;
    border-radius: 4px;
}

.infeed-ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(138, 63, 251, 0.3);
    border-color: rgba(138, 63, 251, 0.4);
}

.infeed-ad-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Responsive in-feed ads */
@media (max-width: 768px) {
    .infeed-ad-card {
        min-height: 280px;
    }
    
    .infeed-ad-container {
        padding: 10px;
    }
}

/* Side Banner Ads (728x90) */
.ad-sidebar-left,
.ad-sidebar-right {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    width: 728px;
    height: 90px;
}

.ad-sidebar-left {
    left: 0;
    transform-origin: left center;
    transform: translateY(-50%) rotate(-90deg) translateX(-50%);
}

.ad-sidebar-right {
    right: 0;
    transform-origin: right center;
    transform: translateY(-50%) rotate(90deg) translateX(50%);
}

/* Mobile Modal Ad Styles */
#mobile-ad-modal .modal-content {
    background: rgba(26, 15, 43, 0.95) !important;
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 10px;
}

#mobile-ad-modal .btn-close {
    background-color: var(--accent-color);
    opacity: 1;
    border-radius: 50%;
    padding: 10px;
}

#mobile-ad-modal .btn-close:hover {
    background-color: var(--accent-hover);
    transform: scale(1.1);
}

#mobile-ad-modal .modal-body {
    padding: 20px;
}

#ad-mobile-modal {
    margin: 0 auto;
}

/* Responsive adjustments for side banners */
@media (max-width: 1650px) {
    .ad-sidebar-left,
    .ad-sidebar-right {
        display: none !important;
    }
}

@media (min-width: 769px) {
    #mobile-ad-modal {
        display: none !important;
    }
}
