/* ThinkVerse News - Main Styles */
/* Matching ThinkVerseAI-web theme */

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

:root {
    --deep-indigo: #2C2F80;
    --bright-cyan: #26D1F3;
    --soft-violet: #A176F1;
    --slate-gray: #5A5A7A;
    --white: #FFFFFF;
    --midnight-navy: #0D0D2B;
    --primary: #26D1F3;
    --secondary: #A176F1;
    --text-primary: #1a1a2e;
    --text-secondary: #5A5A7A;
    --text-muted: #9ca3af;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 800px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bright-cyan), var(--soft-violet));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(38, 209, 243, 0.3);
}

.btn-secondary {
    background: var(--midnight-navy);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 13, 43, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--bright-cyan), var(--soft-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.logo-subtext {
    font-size: 12px;
    font-weight: 600;
    color: var(--bright-cyan);
    text-align: center;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.planet-icon {
    width: 30px;
    height: 30px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(13, 13, 43, 0.9) 0%, rgba(44, 47, 128, 0.7) 40%, transparent 70%);
    border-radius: 50%;
    filter: drop-shadow(0 0 12px rgba(38, 209, 243, 0.3));
}

.planet-icon::before {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border: 2px solid var(--bright-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(38, 209, 243, 0.5), inset 0 0 8px rgba(38, 209, 243, 0.2);
    animation: elegant-glow 2s ease-in-out infinite alternate;
}

.planet-icon::after {
    content: '';
    position: absolute;
    width: 44px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--bright-cyan) 15%, var(--bright-cyan) 85%, transparent 100%);
    transform: rotate(-15deg);
    box-shadow: 0 0 6px rgba(38, 209, 243, 0.6);
}

@keyframes elegant-glow {
    0% { box-shadow: 0 0 8px rgba(38, 209, 243, 0.5), inset 0 0 8px rgba(38, 209, 243, 0.2); }
    100% { box-shadow: 0 0 16px rgba(38, 209, 243, 0.8), inset 0 0 12px rgba(38, 209, 243, 0.4); }
}

.nav-link {
    color: var(--white);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link-external {
    color: var(--bright-cyan);
}

.nav-link:hover {
    color: var(--bright-cyan);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bright-cyan);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.search-input {
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    width: 150px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    outline: none;
}

.search-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--bright-cyan);
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    min-height: 50vh;
    background: linear-gradient(135deg, var(--midnight-navy) 0%, var(--deep-indigo) 50%, var(--soft-violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--bright-cyan), var(--soft-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
}

/* Sections */
.featured-section,
.posts-section {
    padding: 60px 0;
}

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

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--bright-cyan);
}

/* Featured Grid */
.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.featured-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.featured-main {
    grid-row: span 2;
}

.featured-image {
    position: relative;
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.featured-main .featured-image {
    aspect-ratio: 16/12;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.featured-content {
    padding: 20px;
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.featured-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.featured-title a:hover {
    color: var(--bright-cyan);
}

.featured-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
}

.featured-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.featured-meta i {
    margin-right: 4px;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.posts-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.post-image {
    position: relative;
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--deep-indigo), var(--soft-violet));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
}

.ai-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(161, 118, 241, 0.95);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.post-content {
    padding: 20px;
}

.post-content .category-badge {
    margin-bottom: 10px;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.post-title a:hover {
    color: var(--bright-cyan);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.post-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.post-meta i {
    margin-right: 4px;
}

/* Post Detail */
.post-detail {
    padding-top: 80px;
}

.post-header {
    background: linear-gradient(135deg, var(--midnight-navy) 0%, var(--deep-indigo) 100%);
    padding: 60px 20px;
    text-align: center;
}

.post-detail-title {
    font-size: 36px;
    font-weight: 800;
    color: white;
    max-width: 800px;
    margin: 16px auto;
    line-height: 1.3;
}

.post-detail-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-tag {
    background: rgba(161, 118, 241, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--soft-violet);
}

.post-featured-image {
    max-width: 1000px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.post-featured-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.post-body {
    padding: 60px 20px;
}

.post-content-html {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.post-content-html h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin: 40px 0 20px;
}

.post-content-html h3 {
    font-size: 22px;
    color: var(--text-primary);
    margin: 32px 0 16px;
}

.post-content-html p {
    margin-bottom: 20px;
}

.post-content-html img {
    border-radius: 12px;
    margin: 24px 0;
}

.post-content-html blockquote {
    border-left: 4px solid var(--bright-cyan);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--slate-gray);
}

.post-content-html ul, .post-content-html ol {
    margin: 20px 0;
    padding-left: 24px;
}

.post-content-html li {
    margin-bottom: 8px;
}

.post-image figure {
    margin: 24px 0;
}

.post-image figure img {
    width: 100%;
    border-radius: 12px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.tag {
    background: var(--bg-light);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.share-label {
    font-weight: 600;
    color: var(--text-primary);
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.copy { background: var(--slate-gray); }

/* Related Posts */
.related-posts {
    background: var(--bg-light);
    padding: 60px 20px;
}

/* Category Header */
.category-header {
    background: linear-gradient(135deg, var(--midnight-navy) 0%, var(--deep-indigo) 100%);
    padding: 120px 20px 60px;
    text-align: center;
}

.category-title {
    font-size: 36px;
    font-weight: 800;
    color: white;
}

.category-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 12px;
    font-size: 18px;
}

/* Search */
.search-header {
    background: linear-gradient(135deg, var(--midnight-navy) 0%, var(--deep-indigo) 100%);
    padding: 120px 20px 60px;
    text-align: center;
}

.search-title {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 24px;
}

.search-form-large {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 12px;
}

.search-input-large {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
}

.search-info {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: white;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover,
.page-link.active {
    background: var(--bright-cyan);
    color: white;
}

.page-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-state p {
    margin-bottom: 24px;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flash-message {
    padding: 14px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.flash-success {
    background: #10b981;
    color: white;
}

.flash-error {
    background: #ef4444;
    color: white;
}

.flash-warning {
    background: #f59e0b;
    color: white;
}

.flash-info {
    background: var(--bright-cyan);
    color: white;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
}

.flash-close:hover {
    opacity: 1;
}

/* Footer */
.footer {
    background: var(--midnight-navy);
    padding: 60px 0 30px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.6;
}

.footer-links h4,
.footer-social h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--bright-cyan);
}

.footer-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-admin-link:hover {
    color: var(--bright-cyan);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-main {
        grid-row: auto;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .posts-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-actions .btn {
        display: none;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .post-detail-title {
        font-size: 28px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
