:root {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --accent-color: #38bdf8;
    --header-bg: rgba(15, 23, 42, 0.8);
    --footer-bg: #1e293b;
    --border-color: #334155;
    --font-family: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* Header */
.site-header {
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

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

.logo a:visited,
.logo a:active,
.logo a:hover {
    color: inherit;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
}

/* Hamburger Menu Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Prompt Stats */
.prompt-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    padding: 0 2rem;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Categories Nav */
/* Announcement Bar */
.announcement-bar {
    background-color: var(--accent-color);
    color: #0f172a;
    text-align: center;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    position: sticky;
    top: 73px;
    /* Below header */
    z-index: 95;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

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

/* Categories Nav */
.categories-nav {
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    position: sticky;
    top: 108px;
    /* Header + Announcement height approx */
    z-index: 90;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.categories-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0 1rem;
    scrollbar-width: none;
    /* Firefox */
    scroll-behavior: smooth;
    flex: 1;
    white-space: nowrap;
}

.categories-nav ul::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Opera */
}

/* Nav Buttons */
.nav-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
    flex-shrink: 0;
    z-index: 10;
}

.nav-btn:hover {
    background-color: var(--accent-color);
    color: #0f172a;
    border-color: var(--accent-color);
}

.categories-nav a {
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: inline-block;
}

.categories-nav a:hover,
.categories-nav a.active {
    background-color: var(--accent-color);
    color: #0f172a;
}


/* Prompts Grid */
.prompts-grid {
    display: grid;
    /* 1-column layout for all screens */
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
    /* Limit line length for readability */
    margin: 0 auto;
    /* Center the column */
    padding-top: 3rem;
    /* Add breathing room as requested */
    opacity: 1;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.prompts-grid.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

.prompts-grid.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.prompt-card {
    background-color: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto;
    /* Allow height to fit content in 1 col */
    min-height: auto;
    position: relative;
}

.prompt-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.prompt-text {
    font-size: 1.1rem;
    /* Slightly larger for readability */
    color: #f1f5f9;
    /* Lighter text */
    margin-bottom: 1.5rem;

    /* Lighter box styling */
    background-color: #334155;
    /* Slate 700 - Lighter than card bg */
    padding: 1.25rem;
    border-radius: 8px;
    line-height: 1.7;
    border: 1px solid rgba(255, 255, 255, 0.05);

    /* Scroll for long content */
    max-height: 400px;
    /* Approx 12-16 lines */
    overflow-y: auto;

    /* Scrollbar Styling */
    scrollbar-width: thin;
    scrollbar-color: #64748b #334155;
}

.prompt-text::-webkit-scrollbar {
    width: 6px;
}

.prompt-text::-webkit-scrollbar-track {
    background: #334155;
    border-radius: 4px;
}

.prompt-text::-webkit-scrollbar-thumb {
    background-color: #64748b;
    border-radius: 4px;
}
}

.copy-icon-card {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #94a3b8;
    opacity: 0.5;
}

.card-comment {
    font-size: 0.8rem;
    color: #94a3b8;
    /* Muted text color */
    margin-bottom: 4px;
    text-align: right;
    /* Match footer alignment */
}

.hashtag {
    cursor: pointer;
    transition: color 0.2s;
}

.hashtag:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.card-footer {
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: right;
    margin-top: auto;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    background-color: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 16px;

    /* Compact Sizing */
    width: auto;
    max-width: 600px;
    /* Reduced from 800px */

    padding: 2rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    display: flex;
    gap: 2rem;
}

.modal-left {
    flex: 1;
    max-width: 300px;
}

.modal-left img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modal-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.source-label {
    font-size: 1.5rem;
    /* Larger font */
    color: var(--accent-color);
    /* Highlight color */
    margin-bottom: 2rem;
    font-weight: 700;
    /* Bold */
    text-align: center;
    /* Center alignment */
    width: 100%;
    margin-top: 1rem;
    /* Add some top space */
}

/* Toast Notification - In-flow Position */
.copy-message {
    color: #4ade80;
    /* Green */
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-5px);
}

.copy-message.active {
    opacity: 1;
    transform: translateY(0);
    animation: blink 2s infinite ease-in-out;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

#modal-title {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

#modal-author {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}

#modal-year,
#modal-publisher {
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.store-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.store-icon img {
    height: 30px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.store-icon:hover img {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }

    .modal-left {
        max-width: 100%;
        text-align: center;
    }

    .modal-left img {
        max-height: 300px;
        width: auto;
    }

    .modal-content {
        width: 75vw;
        max-width: 75vw;
        padding: 1.5rem;
    }

    .modal-left img {
        display: block;
        margin: 0 auto;
        max-height: 300px;
        width: auto;
        max-width: 100%;
    }

    .modal-right {
        text-align: center;
        align-items: center;
    }

    .store-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 99;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }

    .main-nav a {
        font-size: 1.5rem;
    }
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 100px;
    text-align: center;
    color: #94a3b8;
}

.site-footer a {
    color: var(--accent-color);
    text-decoration: none;
}

.site-footer a:visited,
.site-footer a:active,
.site-footer a:hover {
    color: var(--accent-color);
}

/* Screenshot Styling */
.card-screenshot {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
    object-fit: cover;
    max-height: 300px;
    display: block;
    background-color: #0f172a;
}

/* Contact Page Section */
#contact-section {
    width: 100%;
    min-height: 80vh;
    /* Fill vertical space roughly */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Top align slightly */
    padding-top: 4rem;
}

.contact-content {
    background-color: #1e293b;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    /* Slightly wider */
    padding: 2rem;
    border-radius: 12px;
}

.contact-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #94a3b8;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-family: inherit;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.submit-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--accent-color);
    color: #000;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

background-color: var(--accent-hover);
}

/* Initial Contact Description */
.contact-desc {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Form Reveal Animation */
.form-reveal {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
    margin-bottom: 0;
}

.form-reveal.active {
    max-height: 150px;
    /* Approximate height for input group */
    opacity: 1;
    margin-bottom: 1.5rem;
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    gap: 10px;
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 140px;
    flex-shrink: 0;
}

.custom-select {
    position: relative;
    width: 100%;
}

.select-selected {
    background-color: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    padding: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select-selected:after {
    position: absolute;
    content: "";
    top: 50%;
    right: 15px;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-color: #fff transparent transparent transparent;
    transform: translateY(-25%);
}

.select-selected.select-arrow-active:after {
    border-color: transparent transparent #fff transparent;
    transform: translateY(-75%);
}

.select-items {
    position: absolute;
    background-color: #1e293b;
    border: 1px solid var(--border-color);
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    border-radius: 6px;
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.select-hide {
    display: none;
}

.select-items div {
    color: var(--text-color);
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.select-items div:hover,
.same-as-selected {
    background-color: var(--accent-color);
    color: #000;
}