/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --accent-color: #0ea5e9;
    --bg-dark: #0a0e27;
    --bg-darker: #050714;
    --bg-card: #111827;
    --bg-card-hover: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #e5e7eb;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --border-light: #4b5563;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.25rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
    font-weight: 500;
    font-size: 0.9375rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-primary);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 400;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--border-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: clamp(1.875rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* Featured Posts */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.post-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
    background: var(--bg-card-hover);
}

.post-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-image img {
    transform: scale(1.02);
}

.post-date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.post-content {
    padding: 1.5rem;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 0.9375rem;
}

.post-content a[href*="profile.html"],
.gallery-overlay a[href*="profile.html"],
.image-overlay a[href*="profile.html"] {
    transition: color 0.2s ease, opacity 0.2s ease;
}

.post-content a[href*="profile.html"]:hover,
.gallery-overlay a[href*="profile.html"]:hover,
.image-overlay a[href*="profile.html"]:hover {
    color: var(--primary-light);
    opacity: 1;
}

.post-link:hover {
    color: var(--primary-color);
}

/* Featured Images */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.image-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.image-card:hover img {
    transform: scale(1.03);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.2s ease;
}

.image-card:hover .image-overlay {
    transform: translateY(0);
}

.image-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.image-date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Page Header */
.page-header {
    padding: 4rem 0 2rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.1), transparent);
}

.page-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Filter Bar */
.filter-bar {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.filter-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.sort-select {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
}

/* Gallery */
.gallery-section {
    padding: 2rem 0 4rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-date {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.gallery-view-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.gallery-view-btn:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.gallery-footer {
    text-align: center;
    margin-top: 3rem;
}

/* Lightbox */
/* Image Lightbox */
.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.image-lightbox.active {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.lightbox-info {
    color: white;
    text-align: center;
    margin-top: 1.5rem;
    max-width: 100%;
}

.lightbox-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.lightbox-date {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }
    
    .lightbox-image {
        max-height: 80vh;
    }
    
    .lightbox-info {
        margin-top: 1rem;
    }
}

/* Upload Section */
.upload-section {
    padding: 2rem 0 4rem;
}

.upload-container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.upload-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 2rem;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.03);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.06);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    font-weight: 300;
    color: var(--text-muted);
}

.upload-area h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.upload-area p {
    color: var(--text-secondary);
}

.upload-link {
    color: var(--primary-light);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.upload-hint {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.upload-preview {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.upload-preview img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    background: var(--bg-darker);
}

.preview-remove {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.upload-progress {
    margin: 1.5rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-darker);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.upload-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.upload-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.upload-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.upload-guidelines {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    height: fit-content;
}

.upload-guidelines h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.upload-guidelines ul {
    list-style: none;
}

.upload-guidelines li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.upload-guidelines li:last-child {
    border-bottom: none;
}

/* Auth Pages */
.auth-section {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.auth-container {
    max-width: 450px;
    margin: 0 auto;
    width: 100%;
}

.auth-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auth-form {
    margin-top: 2rem;
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.auth-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* CAPTCHA */
.captcha-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.captcha-question {
    background: var(--bg-darker);
    padding: 1rem 1.5rem;
    border-radius: 6px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-light);
    border: 1px solid var(--border-color);
    min-width: 120px;
    text-align: center;
}

.captcha-input {
    flex: 1;
    min-width: 100px;
}

/* Admin Panel */
.admin-section {
    padding: 2rem 0 4rem;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.admin-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.admin-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
}

.admin-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.admin-item-info {
    padding: 1.5rem;
}

.admin-item-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.admin-item-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.admin-item-info small {
    color: var(--text-muted);
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-btn {
    padding: 0.5rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-light);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .posts-grid,
    .images-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .upload-container {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filter-bar .container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-controls {
        justify-content: center;
    }

    .page-title {
        font-size: 2rem;
    }
}
