@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #0a1105;
    --primary-green: #6C8E38;
    --dark-green: #3D521F;
    --list-bg: #ffffff;
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-color: #dddddd;
    --active-item: #82A944;
    --player-control-bg: rgba(0, 0, 0, 0.7);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    min-height: 100vh;
}

#pc-bg-ad {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
}

/* ANA KONTEYNER (Alt boşluk kaldırıldı çünkü mobil menü iptal) */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-green);
}

.brand {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
}

.brand span {
    color: var(--primary-green);
}

.main-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

.sidebar-section {
    background: var(--list-bg);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    max-height: 600px;
}

.date-header {
    background: var(--primary-green);
    color: #fff;
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 600;
}

.category-tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.category-tabs button {
    flex: 1;
    padding: 12px 5px;
    border: none;
    background: none;
    font-size: 11px;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    border-right: 1px solid var(--border-color);
    transition: 0.3s;
}

.category-tabs button.active, .category-tabs button:hover {
    background: var(--primary-green);
    color: #fff;
}

.channel-list-container {
    overflow-y: auto;
    flex: 1;
    background: #fff;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.channel-item:hover {
    background: #f9f9f9;
}

.channel-item.active {
    background: var(--active-item);
    color: #fff;
}

.channel-item img {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    object-fit: contain;
    background: transparent;
}

.player-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-header {
    background: var(--primary-green);
    padding: 10px 20px;
    border-radius: 4px 4px 0 0;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-badge {
    background: red;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.player-wrapper {
    background: #000;
    border: 4px solid var(--primary-green);
    border-radius: 0 4px 4px 4px;
    position: relative;
    aspect-ratio: 16/9;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.video-container {
    width: 100%;
    height: 100%;
}

.player-wrapper video,
.player-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: #000;
}

.player-logo {
    position: absolute;
    top: 15px;
    right: 15px;
    max-width: 100px;
    max-height: 50px;
    z-index: 10;
    pointer-events: none;
}

.big-play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 15;
    cursor: pointer;
}

.big-play-overlay svg {
    width: 80px;
    height: 80px;
    fill: var(--primary-green);
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.8));
    animation: pulsePlay 1.5s infinite;
}

@keyframes pulsePlay {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}

.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, var(--player-control-bg));
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 15px;
    transition: opacity 0.3s;
    z-index: 20;
}

.player-wrapper:hover .custom-controls {
    opacity: 1;
}

.control-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.control-btn:hover {
    color: var(--primary-green);
}

.control-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.volume-slider {
    width: 80px;
    cursor: pointer;
    accent-color: var(--primary-green);
}

.progress-container {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--primary-green);
    border-radius: 3px;
    width: 100%;
}

.banner-ad {
    width: 100%;
    border: 2px solid var(--primary-green);
    background: #000;
    display: none;
    border-radius: 4px;
    overflow: hidden;
}

.banner-ad img {
    width: 100%;
    max-height: 90px;
    object-fit: contain;
    display: block;
}

.html-ad-container {
    width: 100%;
    text-align: center;
    overflow: hidden;
}

.admin-form {
    background: rgba(108, 142, 56, 0.1);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--primary-green);
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.admin-form h2 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--primary-green);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #111;
    border: 1px solid var(--primary-green);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary-green);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.btn-submit:hover {
    background: var(--dark-green);
}

.btn-danger {
    background: #d9534f;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary-green); }

@media (max-width: 992px) {
    .main-layout { grid-template-columns: 1fr; }
    .sidebar-section { max-height: 400px; }
    .custom-controls { opacity: 1; padding: 10px; } 
}

@media (max-width: 768px) {
    #pc-bg-ad { display: none !important; }
    .app-container { padding-top: 15px; }
}

/* ── Header Social Icons ──────────────────── */
.header-social a:hover {
    background: var(--primary-green) !important;
    color: #fff !important;
    border-color: var(--primary-green) !important;
}
.header-social a svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    display: block;
}

/* ── Footer ───────────────────────────────── */
.site-footer {
    background: linear-gradient(to bottom, #0d1a07, #060d03);
    border-top: 2px solid #6C8E38;
    color: #aaa;
    font-family: 'Montserrat', sans-serif;
    margin-top: 40px;
}

.footer-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 30px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
}

.footer-brand .brand-name {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.footer-brand .brand-name span { color: var(--primary-green); }
.footer-brand p { font-size: 13px; line-height: 1.7; color: #888; max-width: 260px; }

.footer-col h4 {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1e3510;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #888; text-decoration: none; font-size: 13px; transition: color .2s; }
.footer-col ul li a:hover { color: var(--primary-green); }

.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.footer-social a {
    width: 38px; height: 38px;
    border-radius: 8px;
    background: rgba(108,142,56,.12);
    border: 1px solid rgba(108,142,56,.25);
    display: flex; align-items: center; justify-content: center;
    color: #aaa;
    transition: .2s;
    text-decoration: none;
}
.footer-social a:hover {
    background: var(--primary-green);
    color: #fff;
    border-color: var(--primary-green);
}
.footer-social a svg { width: 16px; height: 16px; fill: currentColor; }

.footer-bottom {
    border-top: 1px solid #1e3510;
    padding: 16px 20px;
    text-align: center;
    font-size: 12px;
    color: #555;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .footer-main { grid-template-columns: 1fr; gap: 24px; }
    .header-social { display: none !important; }
}

/* ── Kanal EPG şu an ────────────────────── */
.channel-item { align-items: flex-start !important; }
.channel-item img { margin-top: 2px; flex-shrink: 0; }
.ch-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ch-info > span { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-epg-now { font-size: 10px; color: #6C8E38; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-epg-now em { color: #888; font-style: normal; }

/* ── Duyuru Bandı ────────────────────────── */
.announcements-bar { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.ann-item { display:flex; align-items:baseline; gap:10px; padding:10px 14px; border-radius:6px; flex-wrap:wrap; }
.ann-title { font-weight:700; font-size:13px; color:#fff; white-space:nowrap; }
.ann-content { font-size:12px; color:#ccc; line-height:1.5; }

/* ── Popup Reklam ─────────────────────────── */
.popup-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.8); z-index:9999; align-items:center; justify-content:center; }
.popup-overlay.open { display:flex; }
.popup-box { position:relative; max-width:500px; width:90%; }
.popup-box img { width:100%; border-radius:8px; }
.popup-close { position:absolute; top:-12px; right:-12px; width:28px; height:28px; border-radius:50%; background:#d9534f; color:#fff; border:none; cursor:pointer; font-size:16px; display:flex; align-items:center; justify-content:center; font-weight:bold; }