/*
 * @version 1.2
 * @description Style główne serwisu WIDOOKU - Grid & Dark Mode
 */

 :root {
    --bg-color: #0f0f0f;
    --card-bg: #1a1a1a;
    --text-white: #ffffff;
    --text-grey: #a0a0a0;
    --accent-amber: #FFC107;
    --accent-red: #E50914;
    --gradient-main: linear-gradient(90deg, var(--accent-amber) 0%, var(--accent-red) 100%);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, transparent 100%);
    transition: background 0.4s;
}

.navbar.scrolled { background: #000000; border-bottom: 1px solid #222; padding: 10px 4%; }

.logo { font-size: 1.6rem; font-weight: 800; color: var(--text-white); text-decoration: none; }
.logo span { background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.btn-register {
    background: var(--gradient-main);
    padding: 8px 18px;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.hero-slider { position: relative; width: 100%; height: 85vh; overflow: hidden; }
.slide {
    position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease-in-out;
    display: flex; align-items: center; padding: 0 4%; background-size: cover; background-position: center;
}
.slide.active { opacity: 1; z-index: 10; }
.slide::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(15,15,15,1) 15%, rgba(15,15,15,0.4) 50%, transparent 100%),
                linear-gradient(to top, rgba(15,15,15,1) 0%, transparent 30%);
    z-index: 1;
}

.hero-content { position: relative; max-width: 700px; z-index: 20; transform: translateY(30px); transition: transform 0.8s ease; }
.slide.active .hero-content { transform: translateY(0); }
.hero-title { font-size: 3.5rem; font-weight: 800; margin-bottom: 10px; line-height: 1.1; text-transform: uppercase; }
.hero-desc { color: var(--text-grey); font-size: 1.1rem; margin-bottom: 25px; max-width: 500px; }

.btn-amber { 
    background: var(--gradient-main); color: #fff; padding: 12px 30px; border: none; 
    border-radius: 4px; font-weight: 600; cursor: pointer; transition: 0.3s;
}

.slider-dots { position: absolute; bottom: 30px; right: 4%; display: flex; gap: 10px; z-index: 100; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; transition: 0.3s; }
.dot.active { background: var(--accent-amber); width: 30px; border-radius: 10px; }

.section-title { padding: 0 4%; margin: 50px 0 20px 0; font-size: 1.4rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.slider-container {
    display: grid; grid-auto-flow: column; grid-auto-columns: min-content; gap: 20px;
    padding: 0 4% 40px 4%; overflow-x: auto; scrollbar-width: none;
}
.slider-container::-webkit-scrollbar { display: none; }

.movie-card {
    width: 280px; aspect-ratio: 16/9; background: var(--card-bg);
    border-radius: 6px; position: relative; cursor: pointer; transition: var(--transition);
}
.upcoming-card { width: 380px; }

.popular-wrapper { position: relative; width: 320px; display: flex; align-items: center; justify-content: flex-end; }
.rank-number {
    position: absolute; left: -15px; bottom: -20px; font-size: 7rem; font-weight: 800;
    z-index: 1; color: var(--bg-color); -webkit-text-stroke: 2px rgba(255,255,255,0.3);
    pointer-events: none; transition: var(--transition);
}
.popular-wrapper:hover .rank-number { color: var(--accent-amber); -webkit-text-stroke: 2px var(--accent-amber); }

.movie-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; opacity: 0.8; display: block; }
.movie-card:hover { transform: scale(1.05); z-index: 10; box-shadow: 0 10px 20px rgba(0,0,0,0.6); }

.card-overlay {
    position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    display: flex; flex-direction: column; justify-content: flex-end; padding: 15px; opacity: 0; transition: 0.3s;
}
.movie-card:hover .card-overlay { opacity: 1; }
.badge-upcoming { position: absolute; top: 10px; left: 10px; background: var(--accent-amber); color: #000; padding: 2px 8px; font-weight: 800; font-size: 0.65rem; border-radius: 2px; z-index: 2; }

footer { background: #000; padding: 70px 4% 40px 4%; border-top: 2px solid #1a1a1a; margin-top: 50px; }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.footer-section h4 { color: #fff; margin-bottom: 25px; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 12px; }
.footer-section ul li a { color: var(--text-grey); text-decoration: none; font-size: 0.9rem; transition: 0.3s; }
.footer-section ul li a:hover { color: var(--accent-amber); text-decoration: underline; }
.social-icons { display: flex; gap: 20px; margin-top: 20px; }
.social-icons a { color: #fff; font-size: 1.5rem; transition: 0.3s; }
.social-icons a:hover { color: var(--accent-amber); transform: translateY(-5px); }
.footer-bottom { border-top: 1px solid #1a1a1a; margin-top: 50px; padding-top: 25px; text-align: center; color: #555; font-size: 0.8rem; }

@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-slider { height: 60vh; }
    .rank-number { font-size: 4rem; left: 0; }
    .popular-wrapper { width: 220px; }
}

/* --- LOGIN PAGE STYLES --- */

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

.form-group label {
    display: block;
    color: var(--text-grey);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background-color: #333;
    border: 1px solid transparent;
    border-radius: 4px;
    color: white;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-amber);
    background-color: #444;
}

.btn-login-submit {
    width: 100%;
    padding: 14px;
    margin-top: 15px;
    background: var(--gradient-main);
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-login-submit:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.login-footer {
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--text-grey);
}

.login-footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
    color: var(--accent-amber);
}

.login-body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh; /* Ważne: min-height zamiast height */
    display: flex;
    justify-content: center;
    align-items: center;
    /* Tło: przyciemniony kolaż */
    background: linear-gradient(rgba(15, 15, 15, 0.6), rgba(15, 15, 15, 0.6)), 
                url('https://images.unsplash.com/photo-1536440136628-849c177e76a1?q=80&w=2070');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.login-card {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 50px 40px;
    border-radius: 12px;
    width: 90%; /* Responsywność na mobile */
    max-width: 400px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.login-card h2 { font-size: 2rem; font-weight: 800; margin-bottom: 25px; }

/* Fix dla logo wewnątrz karty logowania */
.login-card .logo {
    justify-content: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

/* --- ADMIN PANEL STYLES --- */
.admin-container {
    padding: 100px 4% 40px 4%;
    max-width: 1400px;
    margin: 0 auto;
}

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

.admin-toolbar {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
    border: 1px solid #333;
}

.search-input {
    flex-grow: 1;
    background: #000;
    border: 1px solid #444;
    padding: 10px 15px;
    color: white;
    border-radius: 4px;
}

/* TABELA BAZY FILMÓW */
.movie-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
}

.movie-table th {
    background: #252525;
    text-align: left;
    padding: 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-grey);
}

.movie-table td {
    padding: 15px;
    border-bottom: 1px solid #222;
    vertical-align: middle;
}

.movie-table tr:hover {
    background: #222;
}

/* STATUSY (Pille) */
.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-online  { background: rgba(40, 167, 69, 0.2);  color: #28a745; }
.status-missing { background: rgba(229, 9, 20, 0.2);   color: var(--accent-red); }
.status-waiting { background: rgba(255, 193, 7, 0.2);  color: var(--accent-amber); }
.status-offline { background: rgba(100, 100, 100, 0.2); color: #888; }
.status-new     { background: rgba(0, 198, 255, 0.15); color: #00c6ff; }
.status-fixed   { background: rgba(40, 167, 69, 0.2);  color: #28a745; }

.admin-btn-import {
    background: var(--gradient-main);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

/* --- ADMIN LAYOUT --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.admin-sidebar {
    width: 260px;
    background-color: #000;
    border-right: 1px solid #222;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
}

.admin-main {
    flex: 1;
    min-width: 0;
    margin-left: 260px;
    padding: 40px;
}

.admin-menu {
    list-style: none;
    margin-top: 40px;
}

.admin-menu li {
    margin-bottom: 10px;
}

.admin-menu a {
    color: var(--text-grey);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    transition: var(--transition);
}

.admin-menu a:hover, .admin-menu a.active {
    background: rgba(255, 193, 7, 0.1);
    color: var(--accent-amber);
}

/* WIDGETY STATYSTYK */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-main);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    display: block;
}

.stat-label {
    color: var(--text-grey);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-icon {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2.5rem;
    opacity: 0.1;
}

/* --- USER MANAGEMENT STYLES --- */
.badge-gold {
    background: linear-gradient(45deg, #FFD700, #FFA000);
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.7rem;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.badge-silver {
    background: linear-gradient(45deg, #C0C0C0, #808080);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.7rem;
}

.badge-user {
    background: #444;
    color: #eee;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
}

.credit-amount {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 800;
    color: var(--accent-amber);
}

/* --- ADMIN SLIDER MANAGEMENT --- */
.slider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.slide-edit-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid #333;
    overflow: hidden;
    transition: var(--transition);
}

.slide-edit-card:hover {
    border-color: var(--accent-amber);
}

.slide-preview {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.slide-preview::after {
    content: 'PODGLĄD SLAJDU';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    padding: 3px 8px;
    font-size: 0.6rem;
    border-radius: 4px;
}

.slide-form {
    padding: 20px;
}

.slide-num-badge {
    background: var(--accent-amber);
    color: #000;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-bottom: 15px;
}

/* --- ADMIN SLIDER MODERNIZED --- */
.admin-split-view {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    margin-top: 20px;
}

/* LISTA SLAJDÓW */
.slide-list {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid #333;
    overflow: hidden;
}

.slide-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: var(--transition);
}

.slide-item:hover, .slide-item.active {
    background: rgba(255, 193, 7, 0.05);
}

.slide-item.active {
    border-left: 4px solid var(--accent-amber);
}

.slide-thumb {
    width: 80px;
    height: 45px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #444;
}

.slide-info h5 {
    font-size: 0.9rem;
    margin: 0;
}

.slide-info span {
    font-size: 0.7rem;
    color: var(--text-grey);
}

/* PANEL EDYCJI */
.edit-panel {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid #333;
    padding: 30px;
}

.btn-delete-slide {
    background: transparent;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

/* --- ADMIN SLIDER TABLE STYLES --- */
.slider-thumb-admin {
    width: 120px;
    height: 67px; /* Zachowanie proporcji 16:9 */
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #333;
}

.order-badge {
    background: #222;
    color: var(--accent-amber);
    border: 1px solid var(--accent-amber);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.8rem;
}

/* --- ADMIN REPORTS STYLES --- */
.priority-high {
    color: #ff4d4d;
    font-weight: 800;
    animation: pulse-red 2s infinite;
}

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

.report-subject {
    font-weight: 600;
    color: var(--text-white);
}

.report-meta {
    font-size: 0.75rem;
    color: var(--text-grey);
}

/* --- ADMIN CONFIG STYLES --- */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
}

.config-card {
    background: var(--card-bg);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 30px;
}

.config-card h3 {
    margin-bottom: 25px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
}

.config-card h3 i {
    color: var(--accent-amber);
}

.form-help {
    font-size: 0.75rem;
    color: #555;
    margin-top: 5px;
}

/* --- SECURITY & INTEGRITY STYLES --- */
.security-status {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}

.status-safe { background: rgba(40, 167, 69, 0.1); color: #28a745; border: 1px solid #28a745; }
.status-warn { background: rgba(229, 9, 20, 0.1); color: var(--accent-red); border: 1px solid var(--accent-red); }

.checksum-box {
    font-family: 'Courier New', monospace;
    background: #000;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-grey);
    word-break: break-all;
}

.honeypot-list {
    list-style: none;
    background: #111;
    border-radius: 6px;
    padding: 10px;
}

.honeypot-list li {
    padding: 8px;
    border-bottom: 1px solid #222;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
}

/* --- PLAYER PAGE STYLES --- */
.player-container {
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 50px;
}

.video-frame {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    border: 1px solid #222;
    position: relative;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--accent-amber);
    text-align: center;
}

/* LISTA SERWERÓW / ŹRÓDEŁ */
.source-selector {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.source-btn {
    background: var(--card-bg);
    border: 1px solid #333;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.source-btn:hover { border-color: var(--accent-amber); background: #222; }
.source-btn.active { border-color: var(--accent-amber); background: rgba(255,193,7,0.1); }

.source-btn i { font-size: 1.2rem; }
.vip-lock { color: var(--accent-amber); font-size: 0.8rem; margin-left: auto; }

/* OPIS FILMU */
.movie-info-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    margin-top: 30px;
}

.movie-poster-large {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #333;
}

.movie-meta {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    font-size: 0.9rem;
    color: var(--text-grey);
}

/* --- TOP-UP MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none; /* Ukryty domyślnie */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: #111;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    border: 1px solid #333;
    padding: 30px;
    position: relative;
}

.credit-packages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
}

.package-card {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.package-card:hover {
    border-color: var(--accent-amber);
    background: rgba(255, 193, 7, 0.05);
    transform: translateY(-5px);
}

.package-amount {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-amber);
}

.package-price {
    font-size: 0.9rem;
    color: var(--text-grey);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #666;
    cursor: pointer;
    font-size: 1.2rem;
}

/* --- WIDOOKU PUSH-UP NOTIFICATIONS --- */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.push-up {
    background: rgba(17, 17, 17, 0.95);
    border-left: 4px solid var(--accent-amber);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    backdrop-filter: blur(10px);
    border: 1px solid #333;
    border-left: 4px solid var(--accent-amber);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.push-up.show {
    transform: translateX(0);
}

.push-up.error { border-left-color: var(--accent-red); }
.push-up.success { border-left-color: #28a745; }

.push-up i {
    font-size: 1.2rem;
    color: var(--accent-amber);
}

.push-up.error i { color: var(--accent-red); }
.push-up.success i { color: #28a745; }

.push-content b {
    display: block;
    font-size: 0.9rem;
}

.push-content span {
    font-size: 0.75rem;
    color: var(--text-grey);
}

/* --- MOVIES LIBRARY STYLES --- */
.movies-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 100px 4% 50px 4%;
}

/* FILTRY BOCZNE */
.filter-sidebar {
    background: var(--card-bg);
    border: 1px solid #222;
    border-radius: 12px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--accent-amber);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.filter-list {
    list-style: none;
}

.filter-list li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-grey);
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    justify-content: space-between;
}

.filter-list li:hover, .filter-list li.active {
    color: white;
}

.filter-count {
    background: #222;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

/* WYSZUKIWARKA W KATALOGU */
.catalog-search {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    padding: 15px 25px;
    border-radius: 50px;
    color: white;
    margin-bottom: 30px;
    font-family: inherit;
}

/* --- USER PROFILE STYLES --- */
.profile-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    padding: 120px 4% 50px 4%;
}

.profile-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid #222;
    padding: 30px;
}

.user-stat-box {
    background: #111;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #222;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.history-table th {
    text-align: left;
    color: var(--text-grey);
    font-size: 0.8rem;
    padding: 10px;
    border-bottom: 1px solid #333;
}

.history-table td {
    padding: 15px 10px;
    font-size: 0.9rem;
    border-bottom: 1px solid #222;
}

.badge-status {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* --- 404 ERROR PAGE STYLES --- */
.error-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #000;
    overflow: hidden;
    position: relative;
}

.error-code {
    font-size: 15rem;
    font-weight: 900;
    line-height: 1;
    background: url('https://media.giphy.com/media/oEI9uWUicG_BK/giphy.gif'); /* Efekt śnieżenia */
    background-size: cover;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(255, 193, 7, 0.2));
}

.error-message {
    margin-top: -20px;
    z-index: 1;
}

.error-message h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.error-message p {
    color: var(--text-grey);
    margin-bottom: 30px;
}

.glitch-btn {
    padding: 15px 40px;
    background: var(--accent-amber);
    color: #000;
    text-decoration: none;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
    transition: 0.3s;
}

.glitch-btn:hover {
    box-shadow: 0 0 30px var(--accent-amber);
    transform: scale(1.05);
}

/* --- RESPONSIVE ADMIN SIDEBAR --- */
@media (max-width: 992px) {
    .admin-layout {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 9999;
        transition: var(--transition);
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }

    .admin-sidebar.active {
        left: 0;
    }

    .admin-main {
        flex: none;
        margin-left: 0;
        padding: 80px 20px 20px 20px;
        overflow-x: hidden;   /* blokuje poziomy scroll z treści strony */
        min-width: 0;
    }

    /* Nagłówek sekcji zawija przyciski zamiast rozciągać stronę */
    .admin-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .admin-header h2 {
        font-size: 1.15rem;
    }

    /* Pasek narzędziowy (wyszukiwarka + przyciski) zawija się */
    .admin-toolbar {
        flex-wrap: wrap;
    }

    /* Pasek mobilny nigdy nie wychodzi poza viewport */
    .admin-mobile-nav {
        max-width: 100vw;
        box-sizing: border-box;
    }

    /* Przycisk hamburgera (widoczny tylko na mobile) */
    .admin-mobile-nav {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #111;
        border-bottom: 1px solid #333;
        z-index: 9998;
        align-items: center;
        padding: 0 20px;
        justify-content: space-between;
    }

    /* Overlay przyciemniający treść gdy sidebar jest otwarty */
    .admin-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 9998;
        backdrop-filter: blur(2px);
    }

    .admin-sidebar-overlay.active {
        display: block;
    }
}

/* Ukrywamy hamburger na desktopie */
.admin-mobile-nav {
    display: none;
}

/* Overlay niewidoczny na desktopie */
.admin-sidebar-overlay {
    display: none;
}

/* --- ADMIN TABLES --- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
}

.admin-table th {
    background: #111;
    color: var(--accent-amber);
    text-align: left;
    padding: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #222;
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid #222;
    color: var(--text-white);
    font-size: 0.9rem;
    vertical-align: middle;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}


/* Kontener dla responsywności (zapobiega rozciąganiu strony na mobile) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* W static/css/style.css upewnij się, że masz: */
.slider-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-behavior: smooth;
}
.movie-card {
    min-width: 180px; /* Stała szerokość karty w rzędzie */
    position: relative;
}

/* Siatka statystyk */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

/* Karta statystyk */
.stat-card {
    background: #1a1a1a; /* Ciemne tło karty */
    border: 1px solid #333;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-amber);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Kontener ikony */
.stat-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Kolory ikon */
.stat-icon-box.amber { background: rgba(255, 191, 0, 0.1); color: #ffbf00; }
.stat-icon-box.blue  { background: rgba(0, 123, 255, 0.1); color: #007bff; }
.stat-icon-box.green { background: rgba(40, 167, 69, 0.1); color: #28a745; }
.stat-icon-box.red   { background: rgba(220, 53, 69, 0.1); color: #dc3545; }

/* Treść karty */
.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: #888;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.stat-value {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 2px 0;
}

.stat-sub {
    font-size: 0.7rem;
    color: #555;
}

.stat-sub.green { color: #28a745; }
.stat-sub.red   { color: #dc3545; }

/* Sekcja aktywności */
.activity-section {
    margin-top: 40px;
    background: #161616;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #222;
}

.activity-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Srebrna Ranga */
.badge-silver {
    background: linear-gradient(45deg, #bdc3c7, #2c3e50);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.7rem;
    display: inline-block;
    text-transform: uppercase;
}

/* Pozostałe dla przypomnienia */
.badge-gold { background: linear-gradient(45deg, #ffd700, #ff8c00); color: #000; }
.badge-red { background: linear-gradient(45deg, #e50914, #8e060c); color: #fff; }
.badge-friend { background: linear-gradient(45deg, #00c6ff, #0072ff); color: #fff; }
.badge-standard { background: #333; color: #aaa; }

/* Efekt najechania na kartę filmu */
.movie-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.movie-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: var(--accent-amber) !important;
}

/* Powiększanie samego zdjęcia wewnątrz */
.movie-card img {
    transition: transform 0.6s ease;
}

.movie-card:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Efekt dla opisu na gradiencie */
.movie-card div[style*="background: linear-gradient"] {
    transition: all 0.4s ease;
}

.movie-card:hover div[style*="background: linear-gradient"] {
    padding-bottom: 30px; /* Lekkie przesunięcie tekstu do góry */
}

/* --- STYLE DLA LINKU PODGLĄDU --- */
.admin-preview-link {
    color: var(--accent-amber);
    text-decoration: none;
    font-weight: 800;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.admin-preview-link:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 191, 0, 0.5);
    transform: translateX(3px);
}

.admin-preview-link i {
    font-size: 0.7rem;
    opacity: 0.4;
}

/* --- STYLE DLA POWIĄZAŃ (TAGI) --- */
.relation-tag {
    background: rgba(255, 191, 0, 0.1);
    border: 1px solid rgba(255, 191, 0, 0.3);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    transition: 0.3s;
}

.relation-tag:hover {
    background: rgba(255, 191, 0, 0.2);
    border-color: var(--accent-amber);
}

.relation-tag a {
    color: #ff4444;
    text-decoration: none;
    line-height: 0;
    transition: 0.2s;
}

.relation-tag a:hover {
    color: #ff0000;
    transform: scale(1.2);
}

/* --- STYLE DLA WYSZUKIWARKI AJAX --- */
#ajaxResults {
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-amber) #111;
}

.search-item-row {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #222;
    color: #ccc;
    transition: 0.2s;
    font-size: 0.9rem;
}

.search-item-row:hover {
    background: #222;
    color: var(--accent-amber);
    padding-left: 20px;
}

/* --- POPRAWKA TABELI --- */
.movie-table td {
    vertical-align: middle;
    padding: 15px 10px;
}

.movie-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}


#server-offline-layer {
    background: #000;
    color: white;
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #ff4444;
}

.player-overlay {
    position: absolute;
    inset: 0;
    background: #0a0a0a;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    border-radius: 20px;
    overflow-y: auto; /* DODAJ TO: pozwala przewijać treść jeśli się nie mieści */
}

.movie-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

.movie-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    filter: brightness(0.85); /* Lekkie przyciemnienie nieaktywnych */
    border: 1px solid rgba(255,255,255,0.05) !important;
}

.movie-card:hover {
    transform: scale(1.1) translateY(-10px) !important;
    z-index: 100 !important;
    filter: brightness(1.1); /* Rozjaśnienie na hover */
    box-shadow: 0 15px 35px rgba(255, 191, 0, 0.25) !important; /* Amberowy blask */
    border-color: var(--accent-amber) !important;
}

/* Efekt pojawiającego się przycisku PLAY na środku kafelka */
.movie-card::after {
    content: '\f144'; /* Ikona Play z FontAwesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    color: var(--accent-amber);
    opacity: 0;
    transition: 0.3s;
    z-index: 3;
    pointer-events: none;
}

.movie-card:hover::after {
    opacity: 1;
    top: 50%;
}

/* --- NOWOCZESNE KAFELKI POWIĄZANYCH --- */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.related-card {
    position: relative;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 2/3;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
}

.related-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

/* Warstwa z ikoną Play i Gradientem */
.related-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, 
        rgba(0,0,0,0.9) 0%, 
        rgba(0,0,0,0.4) 50%, 
        rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 15px;
    opacity: 0.8; /* Lekkie przyciemnienie na start */
    transition: 0.3s ease;
    z-index: 2;
}

.related-card .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 3rem;
    color: var(--accent-amber);
    opacity: 0;
    transition: 0.3s ease;
}

.related-card .related-title {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    transition: transform 0.3s ease;
}

/* --- EFEKTY NA NAJECHANIE (HOVER) --- */
.related-card:hover {
    transform: scale(1.05) translateY(-8px);
    border-color: var(--accent-amber);
    box-shadow: 0 10px 25px rgba(255, 191, 0, 0.2);
}

.related-card:hover img {
    transform: scale(1.1);
    filter: brightness(0.5) blur(1px);
}

.related-card:hover .card-overlay {
    opacity: 1;
}

.related-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.related-card:hover .related-title {
    transform: translateY(-5px);
}

@media (max-width: 480px) {
    .related-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
}

/* --- FIX DLA KOMUNIKATÓW W PLAYERZE NA MOBILE --- */
@media (max-width: 768px) {
    .player-overlay {
        padding: 15px !important; /* Mniejszy margines wewnętrzny */
        justify-content: center !important;
        overflow-y: auto; /* W razie czego pozwoli przewinąć treść palcem */
    }

    .player-overlay i {
        font-size: 1.8rem !important; /* Znacznie mniejsza ikona */
        margin-bottom: 8px !important;
    }

    .player-overlay h2 {
        font-size: 1.1rem !important; /* Mniejszy tytuł */
        margin-bottom: 5px !important;
    }

    .player-overlay p {
        font-size: 0.75rem !important; /* Mniejszy opis */
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
        max-width: 100% !important;
    }

    /* Przyciski wewnątrz nakładki */
    .player-overlay .btn-amber, 
    .player-overlay .tab-btn {
        padding: 8px 16px !important;
        font-size: 0.75rem !important;
        border-radius: 8px !important;
    }

    /* Układ przycisków obok siebie */
    .player-overlay div[style*="display: flex"] {
        gap: 8px !important;
    }
}

/* Ekstremalnie małe ekrany lub tryb poziomy z niską wysokością */
@media (max-height: 400px) {
    .player-overlay i { display: none; } /* Chowamy ikonę, by ratować miejsce */
    .player-overlay h2 { font-size: 1rem !important; }
}