:root {
    /* Premium Modern Light Palette */
    --bg-main: #f9fafb;
    --bg-card: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    
    --header-bg: rgba(255, 255, 255, 0.95);
    
    --result-color: #db2777;
    --admit-color: #d97706;
    --job-color: #059669;
    --secondary-color: #6366f1;
    
    --border-color: #e5e7eb;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark Mode Palette */
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-color: #60a5fa;
    --accent-hover: #3b82f6;
    
    --header-bg: rgba(30, 41, 59, 0.85);
    
    --border-color: #334155;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* Header & Navigation */
.glass-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
}

.logo-icon {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.logo h1 {
    font-size: 1.5rem;
}

.logo h1 span {
    color: var(--text-primary);
}

.desktop-nav {
    display: flex;
    gap: 30px;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.desktop-nav a:hover, .desktop-nav a.active {
    color: var(--accent-color);
}

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

.desktop-nav a:hover::after, .desktop-nav a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle, .mobile-menu-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.theme-toggle:hover {
    background: var(--border-color);
}

.mobile-menu-btn {
    display: none;
}

/* Ticker Marquee */
.ticker-wrapper {
    display: flex;
    background: linear-gradient(90deg, #1e293b, #0f172a);
    color: white;
    height: 40px;
    align-items: center;
    overflow: hidden;
}

.ticker-label {
    background: #ef4444;
    padding: 0 15px;
    font-weight: 700;
    font-size: 0.85rem;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 10;
    white-space: nowrap;
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-track {
    display: flex;
    gap: 50px;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
}

.ticker-track span {
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.ticker-track span::before {
    content: '•';
    color: #ef4444;
    margin-right: 15px;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #1e1b4b, #312e81, #701a75, #831843);
    background-size: 300% 300%;
    animation: gradientMove 8s ease infinite;
    color: white;
    border-radius: 0 0 30px 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero {
    padding: 20px 20px 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: fadeInUp 0.5s ease;
}

.hero-badge i {
    color: #eab308; /* Gold Star/Crown */
}

.hero h2 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 5px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.gradient-text {
    background: linear-gradient(to right, #fde047, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.hero p {
    font-size: 1.1rem;
    color: #e2e8f0;
    max-width: 600px;
    margin-bottom: 15px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 6px 8px 6px 20px;
    box-shadow: var(--shadow-soft);
    width: 100%;
    max-width: 480px;
    transition: box-shadow 0.3s;
    overflow: hidden; /* Prevent nested elements from breaking border radius */
}

.search-bar:focus-within {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    border-color: var(--accent-color);
}

.search-bar i {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.search-bar input {
    flex: 1;
    min-width: 0; /* CRITICAL: Allows input to shrink smaller than placeholder on mobile */
    border: none;
    background: transparent;
    padding: 10px 10px;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    text-overflow: ellipsis;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

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

.btn-primary:active {
    transform: scale(0.98);
}

/* Social Join Buttons */
.social-join {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    color: white;
    font-size: 1.05rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn-social:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    filter: brightness(1.1);
}

.btn-telegram {
    background: linear-gradient(135deg, #0088cc, #005c8a);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

/* Trending Grid */
.trending-wrapper {
    padding-bottom: 20px;
}
.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}
.trending-box {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    line-height: 1.3;
}
.trending-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    filter: brightness(1.1);
}
/* Variations to make the boxes colorful */
.trending-box:nth-child(even) {
    background: linear-gradient(135deg, var(--result-color), #be185d);
}
.trending-box:nth-child(3n) {
    background: linear-gradient(135deg, var(--job-color), #047857);
}
.trending-box:nth-child(4n) {
    background: linear-gradient(135deg, var(--admit-color), #a16207);
}

/* Layout Grid - Premium 3 Column Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding-bottom: 80px;
}
.hero-box {
    grid-column: span 1;
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .hero-box {
        grid-column: span 2;
    }
}

/* Base state for Mobile Tabs - Hidden on Desktop */
.mobile-tabs-container {
    display: none;
}

/* Details Grid to place tables side by side */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 5px;
    }
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .hero-box {
        grid-column: span 2;
    }
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    /* Reveal App-style Mobile Tabs */
    .mobile-tabs-container {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
        justify-content: space-between;
        background: var(--bg-card);
        padding: 5px;
        border-radius: 40px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        border: 1px solid var(--border-color);
    }
    .mobile-tab {
        flex: 1;
        padding: 12px 5px;
        border: none;
        background: transparent;
        color: var(--text-secondary);
        font-weight: 600;
        font-size: 0.9rem;
        border-radius: 30px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }
    .mobile-tab i {
        font-size: 1rem;
    }
    .mobile-tab.active {
        background: var(--accent-color);
        color: white;
        box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
    }
    .desktop-nav {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero {
        padding: 10px 5px 5px;
    }
    .hero h2 {
        font-size: 1.35rem;
        margin-bottom: 5px;
    }
    .hero p {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    .social-join {
        margin-top: 10px;
        gap: 10px;
    }
    .btn-social {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 25px;
    }
    .trending-box {
        padding: 12px;
        min-height: 40px;
        font-size: 0.9rem;
    }
    .card-header {
        padding: 10px;
        justify-content: center;
    }
    .card-header h3 {
        font-size: 1rem;
        text-align: center;
    }
    .card-body {
        padding: 10px;
    }
    .link-list li {
        padding: 10px 0;
    }
    .link-list a {
        font-size: 0.85rem;
        font-weight: 600;
        line-height: 1.3;
    }
    .link-list a i {
        display: none; /* Hide arrows on mobile to save space */
    }
    .link-list .date {
        font-size: 0.75rem;
    }
    .view-all {
        font-size: 0.75rem;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .hero-box {
        grid-column: auto;
    }
    .trending-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.category-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    padding: 15px 20px;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bg-result { background: linear-gradient(135deg, var(--result-color), #be185d); }
.bg-admit { background: linear-gradient(135deg, var(--admit-color), #a16207); }
.bg-job { background: linear-gradient(135deg, var(--job-color), #047857); }
.bg-secondary { background: linear-gradient(135deg, var(--secondary-color), #6d28d9); }

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.link-list {
    list-style: none;
    margin-bottom: 20px;
    flex: 1;
}

.link-list li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    line-height: 1.4;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

body[data-theme='dark'] .link-list li {
    background: rgba(255,255,255,0.02);
}

.link-list li:last-child {
    margin-bottom: 0;
}

.link-list li:hover {
    background-color: rgba(59, 130, 246, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.link-list a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.2s;
    display: block;
}

.link-list a i {
    color: var(--accent-color);
    margin-right: 6px;
    font-size: 0.8rem;
}

.link-list a:hover {
    color: var(--accent-hover);
}

.link-list .date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
    font-weight: 500;
}

.link-list .new-badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: auto;
    background: rgba(59, 130, 246, 0.1);
    padding: 10px 15px;
    border-radius: 10px;
    justify-content: center;
    transition: background 0.2s;
}

.view-all:hover {
    background: rgba(59, 130, 246, 0.2);
}

/* Footer */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-brand h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-color);
}
.footer-brand span { color: var(--text-primary); }
.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 5px; }

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Article & Details Page Styles --- */
.article-header {
    margin: 40px 0 20px;
    text-align: center;
}

.article-header h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.article-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.article-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.article-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-content h2 {
    color: var(--text-primary);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), transparent);
    margin: 35px 0 20px;
    font-size: 1.4rem;
    border-left: 5px solid #eab308;
    padding: 12px 15px;
    border-radius: 4px;
    font-weight: 700;
}

/* Data Tables */
.data-table-wrapper {
    overflow-x: auto;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    /* Removed min-width so it shrinks on mobile naturally without scrolling */
}

.data-table th, .data-table td {
    padding: 15px;
    border: 1px solid var(--border-color);
    text-align: left;
    font-size: 1.05rem;
}

.data-table th {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: #ffffff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.data-table tr:nth-child(even) {
    background-color: rgba(30, 41, 59, 0.4);
}

.data-table tr:hover {
    background-color: rgba(59, 130, 246, 0.15);
}

.apply-button-container {
    text-align: center;
    margin-top: 40px;
}

.btn-large {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    border: 2px solid rgba(59, 130, 246, 0.5);
    color: var(--text-primary);
    padding: 12px 30px;
    font-size: 1.05rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    background: rgba(30, 41, 59, 0.5);
    transition: all 0.2s;
    width: 90%;
    max-width: 400px;
    margin-bottom: 15px;
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
    color: var(--accent-color);
}

/* Footer Styles */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* CRITICAL FOR MOBILE */
    gap: 30px;
    margin-bottom: 40px;
}

.footer-brand h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.footer-brand span {
    color: var(--accent-color);
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 10px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap; /* CRITICAL FOR MOBILE */
    gap: 15px 25px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

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

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    color: var(--text-secondary);
}

/* Base Responsive Mobile Edits */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .footer-links {
        justify-content: center;
    }

    h1 {
        font-size: 1.8rem;
    }
    
    .hero-section {
        border-radius: 0 0 15px 15px;
    }
    
    .hero h2 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: 0.95rem;
        padding: 0 5px;
        line-height: 1.5;
    }
    
    .search-bar {
        max-width: 95%;
    }
}
