:root {
    --primary: #4f46e5; /* Premium Indigo */
    --primary-hover: #4338ca;
    --primary-light: #eff6ff;
    --secondary: #0ea5e9; /* Modern Sky Blue */
    --emerald: #10b981;
    --rose: #f43f5e;
    --amber: #f59e0b;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --border: #e2e8f0;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Sarabun', 'Outfit', sans-serif;
}

body {
    background-color: #f8fafc;
    color: var(--slate-800);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* Custom Public Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--slate-700);
}

.form-control {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    font-family: 'Sarabun', sans-serif !important;
    background-color: #ffffff !important;
    color: var(--slate-900) !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    box-shadow: none !important;
}

.form-control:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}

textarea.form-control {
    height: auto !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover)) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25) !important;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35) !important;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Modern Glassmorphic Navbar */
.top-navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px -5px rgba(15, 23, 42, 0.05);
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo-circle {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 8px 16px -4px rgba(79, 70, 229, 0.4);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.02em;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--slate-700);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.navbar-menu a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--slate-700);
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
}

.navbar-menu a:hover, .navbar-menu a.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.btn-admin-login {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff !important;
    padding: 0.55rem 1.25rem;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
}

.btn-admin-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

/* Hero Split Grid Section */
.hero-section {
    max-width: 1280px;
    margin: 2.5rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: stretch;
}

@media (max-width: 992px) {
    .hero-section {
        grid-template-columns: 1fr;
    }
}

/* Hero left card: Search & Welcome */
.hero-left-card {
    background: linear-gradient(135deg, var(--slate-900) 0%, #1e1b4b 100%);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.3);
    position: relative;
    overflow: hidden;
}

.hero-left-card::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-tagline {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hero-desc {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 2rem;
}

.search-container-box {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 18px;
    backdrop-filter: blur(8px);
}

.search-input-wrapper {
    display: flex;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-input {
    flex-grow: 1;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    border: none;
    outline: none;
    color: var(--slate-900);
    background: #ffffff;
}

.search-btn {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 0 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-btn:hover {
    background: var(--primary-hover);
}

.popular-tags-row {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.tag-link {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

.tag-link:hover {
    background: var(--primary);
    color: #fff;
}

/* Hero Right Card: Dynamic Slider */
.hero-slider-card {
    position: relative;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    height: 100%;
    min-height: 400px;
}

.slide-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slide-item.active {
    opacity: 1;
    z-index: 2;
}

.slide-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(15, 23, 42, 0.1) 100%);
    z-index: 3;
}

.slide-text-box {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.25rem;
    z-index: 4;
    color: #ffffff;
}

.slide-category-pill {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.85rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.slide-title-link {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.4;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1rem;
}

.slide-title-link:hover {
    color: var(--secondary);
}

/* Modern Stamps */
.modern-stamp {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 10;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: rotate(5deg);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.stamp-real { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.stamp-fake { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.stamp-distorted { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.stamp-inconclusive { background: #f1f5f9; color: #374151; border: 1px solid #e5e7eb; }

.slider-controls {
    position: absolute;
    bottom: 25px;
    right: 25px;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
}

.control-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.control-dot:hover {
    background: rgba(255,255,255,0.3);
}

/* Stat Counters Card Grid */
.stat-section {
    max-width: 1280px;
    margin: 0 auto 2.5rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--card-shadow);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.stat-icon.blue { background: #e0f2fe; color: #0284c7; }
.stat-icon.green { background: #d1fae5; color: #059669; }
.stat-icon.red { background: #fee2e2; color: #dc2626; }

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* Category Filter Tabs & Main Content */
.content-container {
    max-width: 1280px;
    margin: 0 auto 5rem;
    padding: 0 2rem;
}

.filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.01em;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 0.55rem 1.15rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-700);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

/* News Cards Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.news-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    border-color: rgba(99, 102, 241, 0.2);
}

.card-image-box {
    position: relative;
    height: 200px;
    width: 100%;
    background: var(--slate-100);
    overflow: hidden;
}

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

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

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-category-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.card-cat-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}

.card-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}

.card-result-badge.real { background: #d1fae5; color: #065f46; }
.card-result-badge.fake { background: #fee2e2; color: #991b1b; }
.card-result-badge.distorted { background: #fef3c7; color: #92400e; }
.card-result-badge.inconclusive { background: #f1f5f9; color: #374151; }

.card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.45;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3.05rem;
}

.card-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--gray);
    font-weight: 500;
}

.card-footer-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* No Results Card styling */
.no-results-card {
    grid-column: 1 / -1;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.no-results-icon {
    font-size: 3.5rem;
    color: var(--slate-700);
    margin-bottom: 1.5rem;
    background: var(--slate-100);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-reset-search {
    display: inline-block;
    margin-top: 1.5rem;
    background: var(--primary);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
}

.btn-reset-search:hover {
    background: var(--primary-hover);
}

/* Shared Details View Page Styles */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 700;
    color: var(--slate-700);
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--slate-100);
    color: var(--primary);
    border-color: #cbd5e1;
    transform: translateX(-2px);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.25rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--slate-50);
    margin-top: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.image-container img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.info-table td {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.info-table td.label {
    font-weight: 700;
    color: var(--slate-700);
    width: 180px;
}

.info-table td.value {
    color: var(--slate-900);
}

.result-box {
    text-align: center;
    padding: 1.25rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--card-shadow);
}

.details-textbox {
    background: var(--slate-50);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--slate-700);
    white-space: pre-line;
    margin-bottom: 1.5rem;
}

/* Premium Modern Footer */
.modern-footer {
    background: var(--slate-900);
    color: #94a3b8;
    padding: 4.5rem 2rem 2.5rem;
    border-top: 1px solid #1e293b;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 4rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid #1e293b;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.footer-logo-circle {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

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

.footer-links li {
    margin-bottom: 0.85rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: #94a3b8;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-contact-item {
    font-size: 0.9rem;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.footer-contact-icon {
    color: var(--secondary);
    font-size: 1rem;
    margin-top: 0.2rem;
}

.social-row {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #1e293b;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.social-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer-copyright {
    max-width: 1280px;
    margin: 2rem auto 0;
    text-align: center;
    font-size: 0.8rem;
    color: #475569;
    font-weight: 600;
}
