/* RESET & VARIABLES */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --bg-color: #f4f7f9;
    --text-color: #222222;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --accent-red: #d63031;
    --accent-blue: #0984e3;
    --header-gradient: linear-gradient(135deg, #b21f1f, #1a2a6c);
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --border-color: #333333;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

/* ANIMASI SPLASH SCREEN LOGO */
#splash-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: var(--header-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: #ffffff;
    animation: fadeOutSplash 1s forwards 2s;
}

.splash-content {
    text-align: center;
    animation: zoomInSplash 1.2s ease-out;
}

.splash-logo {
    font-size: 3rem;
    font-weight: 800;
}
.splash-logo span { color: #fbc531; }

@keyframes zoomInSplash {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeOutSplash {
    0% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}

/* HEADER GRADASI MERAH DAN BIRU DENGAN TEKS TERANG KONTRAS */
.main-header {
    background: var(--header-gradient);
    color: #ffffff;
    padding: 10px 5%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.header-socials a {
    color: #ffffff;
    margin-right: 15px;
    font-size: 1.1rem;
}
.header-socials a:hover { color: #fbc531; }

.theme-btn, .admin-login-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
}
.theme-btn:hover, .admin-login-btn:hover {
    background: #ffffff;
    color: #1a2a6c !important;
}

.logo-branding {
    text-align: center;
    padding: 15px 0;
}
.logo-branding h1 {
    font-size: 2.4rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}
.logo-branding span { color: #fbc531; }

.category-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.category-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
}
.category-nav a:hover, .category-nav a.active {
    background: rgba(255, 255, 255, 0.25);
    color: #fbc531;
}

/* TEKS BERJALAN */
.ticker-wrapper {
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 35px;
    font-size: 0.9rem;
}
.ticker-label {
    background: var(--accent-red);
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: bold;
    white-space: nowrap;
}
.ticker-content {
    padding-left: 100%;
    white-space: nowrap;
    animation: tickerAnim 25s linear infinite;
}
@keyframes tickerAnim {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* LAYOUT DEKSTOP & HP RESPONSIF */
.main-layout {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 2.7fr 1fr;
    gap: 20px;
}
@media (max-width: 850px) {
    .main-layout { grid-template-columns: 1fr; }
}

/* NEWS GRID */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.news-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.news-card img {
    width: 100%; height: 170px; object-fit: cover;
}
.news-card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-tag {
    font-size: 0.75rem;
    background: var(--accent-blue);
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    align-self: flex-start;
    margin-bottom: 8px;
}

.read-badge {
    background: #27ae60;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.ad-slider-box img {
    width: 100%; height: 230px; object-fit: cover; border-radius: 6px;
}

.main-footer {
    background: #0d1b2a;
    color: #ffffff;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* MODAL & SOSMED */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.7);
    display: flex; justify-content: center; align-items: center;
    z-index: 10000;
}
.modal-content {
    background: var(--card-bg);
    padding: 25px; border-radius: 8px;
    max-width: 700px; width: 90%; max-height: 85vh;
    overflow-y: auto; position: relative;
}
.close-modal-btn {
    position: absolute; top: 15px; right: 20px;
    font-size: 1.8rem; cursor: pointer;
}

.share-buttons button {
    padding: 8px 12px; border: none; border-radius: 4px;
    color: #fff; cursor: pointer; font-weight: bold; margin-right: 5px;
}
.btn-wa { background: #25D366; }
.btn-ig { background: #C13584; }
.btn-x { background: #000000; }
.btn-copy { background: #6c757d; }

/* ADMIN PANEL STYLES */
.admin-body {
    background-color: #2c3e50;
    min-height: 100vh;
    display: flex; justify-content: center; align-items: center; padding: 20px;
}
.login-box { width: 100%; max-width: 420px; }
.password-wrapper { display: flex; }
.password-wrapper input { flex-grow: 1; border-radius: 4px 0 0 4px !important; }
.password-wrapper button {
    padding: 0 12px; background: #eee; border: 1px solid #ccc;
    border-left: none; border-radius: 0 4px 4px 0; cursor: pointer;
}

.dashboard-wrapper {
    width: 100%; max-width: 1100px;
    background: var(--bg-color); padding: 20px; border-radius: 8px;
}
.dash-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; background: var(--card-bg); padding: 15px; border-radius: 8px;
}

.tab-menu { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
    padding: 10px 16px; border: none; background: #ddd;
    border-radius: 4px; cursor: pointer; font-weight: bold;
}
.tab-btn.active { background: var(--accent-blue); color: #fff; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .grid-2col { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.9rem; font-weight: bold; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 9px; border: 1px solid #ccc; border-radius: 4px;
}

.btn-primary { background: var(--accent-blue); color: white; padding: 10px 15px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; }
.btn-primary-block { width: 100%; padding: 12px; background: var(--accent-blue); color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 1rem; font-weight: bold; }
.btn-danger { background: var(--accent-red); color: white; padding: 8px 12px; border: none; border-radius: 4px; cursor: pointer; }
.btn-secondary { background: #6c757d; color: white; padding: 8px 12px; border: none; border-radius: 4px; text-decoration: none; font-size: 0.9rem; }

.hidden { display: none !important; }