/* style.css - Styles for myporn.org TGP blog, optimized for adult content with vibrant TGP aesthetic */
body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #0a0a0a; /* Deep black */
    color: #e0e0e0; /* Light gray for readability */
}

header {
    background-color: #4b0082; /* Vibrant purple */
    color: #ffffff; /* White text */
    text-align: center;
    padding: 20px;
}

header h1 {
    margin: 0;
    font-size: 2em;
}

header p {
    margin: 5px 0 0;
    font-size: 1em;
}

.container {
    max-width: 1100px; /* Container for 4-column grid */
    margin: 0 auto;
    padding: 10px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* Adjusted for 4 columns */
    gap: 8px; /* Reduced gap */
    margin-bottom: 20px;
}

@media (min-width: 1025px) {
    .post-grid {
        grid-template-columns: repeat(4, 1fr); /* Force 4 columns on desktop */
    }
}

.post {
    position: relative;
    background-color: #1c1c1c; /* Dark gray post background */
    padding: 5px; /* Reduced padding */
    border: 1px solid #ff1493; /* Neon pink border */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    text-align: center; /* Center content */
}

.post img {
    width: 100%;
    max-width: 320px; /* Ensure no stretching beyond 320px */
    height: auto; /* Preserve 16:9 ratio without cropping */
    object-fit: contain; /* Show full image */
    display: block;
    margin: 0 auto; /* Center image */
    border-radius: 5px;
    transition: opacity 0.3s;
}

.post-image-link {
    display: block;
}

.post-image-link:hover img {
    opacity: 0.7; /* Dim image on hover */
}

.post-title {
    text-align: center;
    margin: 8px 0;
    font-size: 1em;
    color: #00ffff; /* Neon cyan */
    font-weight: bold;
}

.post .source {
    text-align: center;
    margin: 8px 0;
    font-size: 0.9em;
}

.post .source a {
    color: #00ffff; /* Neon cyan for links */
    text-decoration: none;
}

.post .source a:hover {
    color: #66ffff; /* Lighter cyan on hover */
    text-decoration: underline;
}

.post h2 {
    margin-top: 0;
    color: #e0e0e0; /* Light gray */
    font-size: 1.5em;
}

.post p {
    line-height: 1.6;
}

.tags {
    margin-top: 8px;
    font-size: 0.9em;
    text-align: center;
}

.tags a {
    color: #00ffff; /* Neon cyan for tags */
    text-decoration: none;
    margin: 0 5px;
}

.tags a:hover {
    color: #66ffff; /* Lighter cyan on hover */
    text-decoration: underline;
}

.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    color: #00ffff; /* Neon cyan for pagination links */
    text-decoration: none;
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid #ff1493; /* Neon pink border */
    border-radius: 3px;
}

.pagination a:hover {
    background-color: #2a004b; /* Darker purple on hover */
    color: #66ffff; /* Lighter cyan */
}

.pagination .current {
    background-color: #ff1493; /* Neon pink for current page */
    color: #ffffff; /* White text */
    border-color: #ff1493;
}

.pagination .disabled {
    color: #666666; /* Gray for disabled links */
    border-color: #666666;
    pointer-events: none;
}

.ad-banner {
    text-align: center;
    margin: 20px 0;
}

.ad-banner img.desktop-ad {
    width: 728px;
    height: 90px;
}

.ad-banner img.mobile-ad {
    width: 300px;
    height: 100px;
}

/* Show desktop ad by default, hide mobile */
.ad-banner img.mobile-ad {
    display: none;
}

/* Search form */
.search-form {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ff1493; /* Neon pink border */
    border-radius: 3px;
    background-color: #2a2a2a; /* Darker gray */
    color: #e0e0e0; /* Light gray */
}

.search-form input::placeholder {
    color: #666666;
}

.search-form button {
    background-color: #ff1493; /* Neon pink */
    color: #ffffff;
    padding: 8px 16px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.search-form button:hover {
    background-color: #c71585; /* Darker pink */
}

/* Responsive grid and media queries */
@media (max-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for tablet */
    }
}

@media (max-width: 768px) {
    .ad-banner img.desktop-ad {
        display: none;
    }
    .ad-banner img.mobile-ad {
        display: block;
    }
    .post-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for mobile */
    }
    .container {
        padding: 10px;
    }
    .post {
        padding: 5px;
    }
    .post img {
        max-width: 320px; /* Maintain 16:9 ratio for mobile */
        height: auto;
    }
    .post-title {
        font-size: 0.9em;
    }
    .search-form {
        flex-direction: column;
    }
    .search-form input, .search-form button {
        width: 100%;
    }
}

/* Age verification modal */
.age-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent black */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.age-modal-content {
    background-color: #4b0082; /* Vibrant purple */
    color: #ffffff; /* White text */
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
}

.age-modal-content h2 {
    margin-top: 0;
    font-size: 1.5em;
}

.age-modal-content p {
    margin: 10px 0;
    font-size: 1em;
}

.age-modal-content button {
    background-color: #ff1493; /* Neon pink */
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.age-modal-content button:hover {
    background-color: #c71585; /* Darker pink */
}

/* Admin page styles */
h1 {
    color: #e0e0e0; /* Light gray */
}

.error {
    color: #ff4040; /* Bright red for errors */
}

.success {
    color: #00ff00; /* Neon green for success */
}

form {
    background-color: #1c1c1c; /* Dark gray background */
    padding: 20px;
    border: 1px solid #ff1493; /* Neon pink border */
    border-radius: 8px;
}

label {
    display: block;
    margin: 10px 0 5px;
    color: #e0e0e0;
}

input, textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ff1493;
    border-radius: 3px;
    background-color: #2a2a2a; /* Darker gray */
    color: #e0e0e0;
}

textarea {
    height: 100px;
}

button {
    background-color: #ff1493; /* Neon pink */
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

button:hover {
    background-color: #c71585; /* Darker pink */
}

.logout {
    color: #00ffff; /* Neon cyan */
    text-decoration: none;
}

.logout:hover {
    color: #66ffff; /* Lighter cyan */
    text-decoration: underline;
}

.post-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #1c1c1c;
    border: 1px solid #ff1493;
}

.post-table th, .post-table td {
    padding: 10px;
    border: 1px solid #ff1493;
    text-align: left;
    color: #e0e0e0;
}

.post-table th {
    background-color: #2a004b; /* Darker purple */
}

.post-table img {
    max-width: 100px;
    height: auto;
}

.delete-button {
    background-color: #ff4040; /* Bright red for delete */
}

.delete-button:hover {
    background-color: #cc3333; /* Darker red */
}

/* Load Roboto font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');