/* ==========================================================================
   Heridan TV - Ortak Stiller
   ========================================================================== */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Yayın Ekranı (index.php)
   -------------------------------------------------------------------------- */

.heridan-tv {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
}

.heridan-player-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.heridan-player-wrap iframe,
.heridan-player-wrap .fb-video,
.heridan-player-wrap video,
.heridan-player-wrap #heridan-cloudinary-player,
.heridan-player-wrap #heridan-youtube-target,
.heridan-player-wrap #heridan-youtube-target iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

.heridan-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #fff;
    text-align: center;
    font-size: 1.1rem;
    padding: 20px;
}

.heridan-empty a {
    color: #4da3ff;
}

.heridan-embed-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ff6b6b;
    text-align: center;
    padding: 20px;
    font-size: 1rem;
}

/* Geçiş Ekranı */

.heridan-transition {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    z-index:100000;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.heridan-transition.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.heridan-transition-logo {
    max-width: 60%;
    max-height: 40%;
    animation: heridan-pulse 1.6s ease-in-out infinite;
}

@keyframes heridan-pulse {
    0%   { transform: scale(1);    opacity: 0.9; }
    50%  { transform: scale(1.05); opacity: 1;   }
    100% { transform: scale(1);    opacity: 0.9; }
}

/* --------------------------------------------------------------------------
   Yönetim Paneli (playlist.php)
   -------------------------------------------------------------------------- */

.heridan-admin-body {
    background: #f2f3f5;
    min-height: 100vh;
    padding: 20px;
    color: #1c1e21;
}

.heridan-admin-login {
    max-width: 360px;
    margin: 80px auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.heridan-admin-login h1 {
    font-size: 1.3rem;
    margin: 0 0 20px;
    text-align: center;
}

.heridan-admin-panel {
    max-width: 900px;
    margin: 0 auto;
}

.heridan-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.heridan-admin-header h1 {
    font-size: 1.4rem;
    margin: 0;
}

.heridan-header-links a {
    margin-left: 14px;
    color: #4267b2;
    text-decoration: none;
    font-size: 0.9rem;
}

.heridan-header-links a:hover {
    text-decoration: underline;
}

.heridan-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.heridan-message-success {
    background: #e3f6e5;
    color: #1e7d32;
    border: 1px solid #b8e6bd;
}

.heridan-message-error {
    background: #fdecea;
    color: #c62828;
    border: 1px solid #f5c2c0;
}

.heridan-admin-form-box,
.heridan-admin-list-box {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.heridan-admin-form-box h2,
.heridan-admin-list-box h2 {
    font-size: 1.1rem;
    margin: 0 0 16px;
}

form label {
    display: block;
    font-size: 0.85rem;
    color: #555;
    margin: 12px 0 4px;
}

form input[type="text"],
form input[type="password"],
form input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 0.95rem;
}

form input:focus {
    outline: none;
    border-color: #4267b2;
}

.heridan-form-actions {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

button {
    background: #4267b2;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
}

button:hover {
    background: #35538f;
}

.heridan-admin-login button {
    width: 100%;
    margin-top: 16px;
}

.heridan-cancel-link {
    color: #65676b;
    text-decoration: none;
    font-size: 0.9rem;
}

.heridan-cancel-link:hover {
    text-decoration: underline;
}

.heridan-video-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.heridan-video-table th,
.heridan-video-table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #eceef1;
}

.heridan-video-table th {
    color: #65676b;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.heridan-actions-cell a {
    margin-right: 12px;
    color: #4267b2;
    text-decoration: none;
    font-size: 0.85rem;
}

.heridan-actions-cell a:hover {
    text-decoration: underline;
}

.heridan-platform-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    text-transform: capitalize;
}

.heridan-platform-youtube   { background: #ff0000; }
.heridan-platform-facebook  { background: #1877f2; }
.heridan-platform-instagram { background: #c13584; }
.heridan-platform-tiktok    { background: #010101; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 600px) {
    .heridan-admin-body {
        padding: 10px;
    }
    .heridan-admin-login {
        margin: 40px auto;
        padding: 22px;
    }
    .heridan-admin-form-box,
    .heridan-admin-list-box {
        padding: 14px;
    }
    .heridan-video-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .heridan-transition-logo {
        max-width: 80%;
    }
}

/* ==========================================================================
   Heridan TV v2.0 - Ek Stiller (Overlay, Geçiş Geri Sayımı, Admin Ek Bileşenler)
   ========================================================================== */

/* ---- Overlay ---- */
/* ===========================
   HERIDAN TV OVERLAY
=========================== */

/* ---- Overlay ---- */

.heridan-overlay{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    pointer-events:none;
    z-index:999999;
}

.heridan-overlay-bg{
    position:absolute;
    inset:0;
}

.heridan-overlay-layer{
    position:absolute;
    inset:0;
}
.heridan-overlay-top{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:160px;
    z-index:999999;
}

.heridan-overlay-logo{
    position:absolute;
    top:15px;
    left:15px;

    height:140px;
    width:auto;
    max-width:320px;
    object-fit:contain;
}

.heridan-live-badge{
    position:absolute;
    top:20px;
    right:20px;

    background:#d60000;
    color:#fff;

    padding:8px 18px;
    border-radius:6px;

    font-size:18px;
    font-weight:bold;
}

.heridan-overlay-clockdate{
    position:absolute;
    top:70px;
    right:20px;

    color:#fff;
    text-align:right;
    font-size:20px;
}
.heridan-overlay-bottom{
    position:absolute;
    left:20px;
    right:20px;
    bottom:55px;

    color:#fff;
    z-index:999999;

    text-shadow:0 2px 6px rgba(0,0,0,.9);
}

.heridan-now-playing{
    font-size:24px;
    font-weight:bold;
    margin-bottom:8px;
}

.heridan-next-up{
    font-size:18px;
    margin-bottom:8px;
}

.heridan-site-url{
    font-size:18px;
    font-weight:bold;
    color:#ffd400;
}
.heridan-ticker{
    position:absolute;
    left:0;
    bottom:0;

    width:100%;
    height:42px;

    background:rgba(0,0,0,.85);

    overflow:hidden;
    white-space:nowrap;

    z-index:999999;
}

.heridan-ticker-inner{
    display:inline-block;
    white-space:nowrap;

    padding-left:100%;

    color:#fff;
    font-size:20px;
    line-height:42px;

    animation:heridan-ticker-scroll 30s linear infinite;
}

@keyframes heridan-ticker-scroll{
    0%{
        transform:translateX(0);
    }
    100%{
        transform:translateX(-100%);
    }
}

/* MOBİL */

@media (max-width:600px){

    .heridan-overlay-logo{
        height:90px;
        max-width:180px;
    }

    .heridan-live-badge{
        top:15px;
        right:15px;
        font-size:14px;
        padding:5px 12px;
    }

    .heridan-overlay-clockdate{
        top:55px;
        right:15px;
        font-size:14px;
    }

    .heridan-overlay-bottom{
        left:10px;
        right:10px;
        bottom:48px;
    }

    .heridan-now-playing{
        font-size:16px;
    }

    .heridan-next-up{
        font-size:13px;
    }

    .heridan-site-url{
        font-size:13px;
    }

    .heridan-ticker{
        height:34px;
    }

    .heridan-ticker-inner{
        font-size:15px;
        line-height:34px;
    }

}
/* ---- Geçiş Ekranı Geri Sayımı ---- */

.heridan-countdown {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.heridan-countdown.visible {
    opacity: 1;
}

/* ---- Mobil Tam Ekran Butonu ---- */

.heridan-fullscreen-btn {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
}

/* ---- Admin: Sekmeler ---- */

.heridan-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid #dde1e6;
}

.heridan-tab {
    padding: 10px 16px;
    color: #65676b;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
}

.heridan-tab.active {
    color: #4267b2;
    border-bottom-color: #4267b2;
    font-weight: 600;
}

/* ---- Admin: İstatistik Kutuları ---- */

.heridan-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.heridan-stat-box {
    background: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 110px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.heridan-stat-wide {
    min-width: 220px;
}

.heridan-stat-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1c1e21;
}

.heridan-stat-num-small {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1c1e21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.heridan-stat-label {
    font-size: 0.75rem;
    color: #65676b;
    margin-top: 2px;
}

/* ---- Admin: Form Grid / Checkbox ---- */

.heridan-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.heridan-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    font-size: 0.9rem;
    color: #333;
}

.heridan-checkbox-label input {
    width: auto;
}

form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
}

.heridan-admin-form-box h3 {
    font-size: 0.95rem;
    margin: 20px 0 6px;
    color: #444;
    border-top: 1px solid #eceef1;
    padding-top: 14px;
}

.heridan-inline-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.heridan-inline-form input {
    flex: 1;
}

/* ---- Admin: Liste Araç Çubuğu / Filtreler ---- */

.heridan-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.heridan-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.heridan-filters input,
.heridan-filters select {
    padding: 7px 10px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* ---- Admin: Toplu İşlem Çubuğu ---- */

.heridan-bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.heridan-bulk-bar select {
    padding: 7px 10px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
}

/* ---- Admin: Video Tablosu Ek Öğeleri ---- */

.heridan-thumb {
    width: 64px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    background: #eceef1;
}

.heridan-video-desc {
    font-size: 0.78rem;
    color: #8a8d91;
    margin-top: 2px;
    max-width: 260px;
    white-space: normal;
}

.heridan-drag-handle {
    cursor: grab;
    color: #b0b3b8;
    text-align: center;
    user-select: none;
}

tr.heridan-dragging {
    opacity: 0.4;
}

.heridan-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.heridan-status-active {
    background: #e3f6e5;
    color: #1e7d32;
}

.heridan-status-inactive {
    background: #f0f0f0;
    color: #8a8d91;
}

.heridan-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.heridan-category-chip {
    background: #f0f2f5;
    border-radius: 14px;
    padding: 5px 10px;
    font-size: 0.82rem;
    color: #333;
}

.heridan-category-chip a {
    color: #c62828;
    text-decoration: none;
    margin-left: 6px;
    font-weight: 700;
}

.heridan-log-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
}

.heridan-log-play { background: #e3f6e5; color: #1e7d32; }
.heridan-log-error { background: #fdecea; color: #c62828; }
.heridan-log-admin { background: #e8eefc; color: #3355aa; }

/* ---- Responsive Ek ---- */

@media (max-width: 700px) {
    .heridan-form-grid {
        grid-template-columns: 1fr;
    }
    .heridan-overlay-clockdate {
        display: none;
    }
    .heridan-stat-box {
        min-width: 90px;
        padding: 10px 12px;
    }
}
