/* Base Styles */
:root {
    --primary-color: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary-color: #ec4899;
    --secondary-light: #f472b6;
    --secondary-dark: #db2777;
    --text-color: #e2e8f0;
    --text-light: #94a3b8;
    --text-dark: #f8fafc;
    --background-color: #0f172a;
    --card-color: #1e293b;
    --card-hover: #334155;
    --border-color: #334155;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 15px rgba(139, 92, 246, 0.5);
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 1rem;
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #8b5cf6, #ec4899);
    --gradient-secondary: linear-gradient(135deg, #3b82f6, #10b981);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-light);
    text-decoration: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.small-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Layout */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
}

main {
    flex: 1;
    padding: 1rem 0;
}

/* Header */
.header {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.main-nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.main-nav a:hover:after,
.main-nav a.active:after {
    width: 100%;
}

.main-nav a.active {
    color: var(--primary-light);
}

#createButton {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

#createButton:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Footer */
.footer {
    background-color: var(--card-color);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Content Feed */
.content-feed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background-color: var(--card-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.post-media {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.post-description {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.post-author {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* Interaction Buttons */
.interaction-buttons, .interaction-bar {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

.vote-btn, .share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--card-color);
    color: var(--text-color);
    transition: var(--transition);
}

.vote-btn:hover, .share-btn:hover {
    background-color: var(--card-hover);
    border-color: var(--primary-light);
}

.share-btn {
    margin-left: auto;
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Email Wall */
.email-wall {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.email-capture {
    background-color: var(--card-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s ease-out;
    border: 1px solid var(--border-color);
}

.email-capture h3 {
    margin-bottom: 1rem;
}

.email-capture p {
    margin-bottom: 1.5rem;
}

.email-capture form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-capture input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--background-color);
    color: var(--text-color);
}

.primary-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Floating Share Button */
.floating-share {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
}

.floating-share .share-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    box-shadow: var(--shadow-lg);
    animation: pulse 2s infinite;
}

/* Ad Placeholders */
.ad-banner {
    width: 100%;
    min-height: 90px;
    background: var(--card-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.ad-placeholder {
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 1rem;
    text-align: center;
}

.ad-placeholder.large {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Submit Page */
.submit-container {
    background-color: var(--card-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.submit-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: inherit;
}

.input-group textarea {
    min-height: 120px;
    resize: vertical;
}

.preview-container {
    background-color: var(--background-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
}

.content-preview {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder {
    color: var(--text-light);
    text-align: center;
}

/* Post View */
.post-container {
    background-color: var(--card-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.post-navigation {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.back-button {
    display: inline-flex;
    align-items: center;
    color: var(--text-light);
}

.back-button:hover {
    color: var(--primary-light);
}

/* Comments Section */
.comments-section {
    background-color: var(--card-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.comments-list {
    margin: 1.5rem 0;
}

.comment {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.comment-form {
    margin-top: 1.5rem;
}

.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-height: 100px;
    margin-bottom: 1rem;
    font-family: inherit;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Related Posts */
.related-posts {
    background-color: var(--card-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Leaderboard */
.leaderboard-container {
    max-width: 800px;
    margin: 0 auto;
}

.your-stats, .rewards-info, .leaderboard, .share-cta {
    background-color: var(--card-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.stats-container {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    flex: 1;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

.rewards-list {
    list-style: none;
    margin-top: 1rem;
}

.rewards-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rewards-list li:last-child {
    border-bottom: none;
}

.reward-threshold {
    font-weight: 600;
    color: var(--primary-light);
}

.leaderboard-list {
    list-style: none;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-rank {
    font-weight: 600;
    color: var(--primary-light);
}

.share-link {
    display: flex;
    margin: 1rem 0;
}

.share-link input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background-color: var(--background-color);
    color: var(--text-color);
}

.copy-btn {
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.facebook {
    background: #4267B2;
}

.share-btn.telegram {
    background: #0088cc;
}

.share-btn.reddit {
    background: #FF5700;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background-color: var(--card-color);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s ease-out;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin-bottom: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--error-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 2rem 0;
}

.load-more-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-light);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        width: 100%;
        justify-content: center;
    }
    
    .email-capture {
        padding: 1.5rem;
    }
    
    .interaction-bar, .interaction-buttons {
        flex-wrap: wrap;
    }
    
    .share-button {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.slide-up {
    animation: slideUp 0.4s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* PJAX Transitions */
.page-transition {
    position: relative;
}

.page-transition.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    animation: loadingBar 1s infinite linear;
}

@keyframes loadingBar {
    0% { width: 0; }
    50% { width: 50%; }
    100% { width: 100%; }
}

/* Neon Glow Effects */
.neon-text {
    text-shadow: 0 0 5px var(--primary-light), 0 0 10px var(--primary-light);
}

.neon-border {
    box-shadow: 0 0 5px var(--primary-light), 0 0 10px var(--primary-light);
}

/* Viral Indicators */
.trending-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.trending-badge:before {
    content: "🔥";
    font-size: 0.875rem;
}

.viral-post {
    position: relative;
}

.viral-post:before {
    content: "🚀";
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--gradient-primary);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    z-index: 10;
}

/* Glassmorphism Effects */
.glass-effect {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}