:root {
    --bg-main: #050505;
    --bg-card: #121212;
    --border-color: #2C2C2C;
    --primary: #E60000;
    --text-main: #FFFFFF;
    --text-muted: #808080;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

.rn-wrapper {
    max-width: 1380px;
    margin: 140px auto 80px;
    padding: 0 30px;
}

/* --- NAGŁÓWEK --- */
.rn-hero {
    text-align: center;
    margin-bottom: 50px;
}
.rn-badge-top {
    display: inline-block;
    background: rgba(230, 0, 0, 0.1);
    color: var(--primary);
    border: 1px solid rgba(230, 0, 0, 0.3);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 15px;
}
.rn-main-title {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}
.text-red { color: var(--primary); }
.rn-main-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- TAG NOWY --- */
.rn-tag.new-tag {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* --- LAYOUT GRID --- */
.rn-layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* --- KARTA ARTYKUŁU (LEWA) --- */
.rn-feed { min-width: 0; }

.rn-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
}
.hot-drop { border-top: 2px solid var(--primary); }
.rn-card-glow {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 60%; height: 100px;
    background: radial-gradient(ellipse, rgba(230,0,0,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.rn-card-header {
    padding: 40px 40px 20px 40px;
    border-bottom: 1px solid var(--border-color);
}
.rn-tags {
    display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
}
.rn-tag {
    padding: 6px 14px; border-radius: 8px; font-size: 0.8rem; font-weight: 700;
}
.rn-tag.hot {
    background: var(--primary); color: white;
    box-shadow: 0 0 15px rgba(230,0,0,0.4);
}
.rn-tag.date {
    background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border-color);
}
.rn-article-title {
    font-size: 2.2rem; margin: 0; font-weight: 800; line-height: 1.2;
}

/* --- ZAWARTOŚĆ --- */
.rn-content { padding: 40px; }

.rn-block { margin-bottom: 45px; }
.rn-block-title {
    display: flex; align-items: center; gap: 15px; margin-bottom: 15px;
}
.rn-icon-box {
    width: 45px; height: 45px; border-radius: 12px; background: rgba(230,0,0,0.1);
    color: var(--primary); display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; border: 1px solid rgba(230,0,0,0.2); flex-shrink: 0;
}
.rn-block-title h4 {
    font-size: 1.2rem; margin: 0; font-weight: 700; color: #fff;
}
.rn-text {
    color: #ccc; font-size: 1rem; line-height: 1.6; margin-bottom: 15px;
}

/* --- ALERTY --- */
.rn-alert {
    background: rgba(255,255,255,0.03); border-left: 4px solid var(--primary);
    padding: 15px 20px; border-radius: 0 10px 10px 0; color: var(--text-muted); font-size: 0.9rem;
    line-height: 1.5;
}

/* --- KOD KUPONU --- */
.rn-code-box {
    display: flex; align-items: center; justify-content: space-between;
    background: #000; border: 1px dashed #555; border-radius: 12px;
    padding: 15px 25px; margin: 20px 0; gap: 15px;
}
.code-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; margin-bottom: 4px;}
.code-value { font-family: monospace; font-size: 1.8rem; font-weight: 900; color: #fff; letter-spacing: 2px;}

/* --- PRZYCISKI --- */
.rn-copy-btn {
    background: var(--primary); color: white; border: none; padding: 12px 24px;
    border-radius: 8px; font-weight: 700; cursor: pointer; transition: 0.3s; font-family: 'Poppins';
    white-space: nowrap; flex-shrink: 0;
}
.rn-copy-btn:hover { background: #ff1a1a; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(230,0,0,0.3);}

/* --- SIATKA TICKETÓW --- */
.rn-tickets-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 15px; margin-bottom: 15px;
}
.rn-ticket {
    background: linear-gradient(135deg, #1A1A1A, #121212);
    border: 1px solid var(--border-color); border-radius: 10px; padding: 15px; text-align: center;
    position: relative; overflow: hidden;
}
.rn-ticket::before {
    content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; background: var(--bg-card); border-radius: 50%; border-right: 1px solid var(--border-color);
}
.rn-ticket .val { color: var(--primary); font-size: 1.3rem; font-weight: 900; margin-bottom: 5px; }
.rn-ticket .cond { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; font-weight: 600;}

/* --- TIERY --- */
.rn-tiers { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.rn-tier {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.02); border: 1px solid var(--border-color); padding: 15px 20px; border-radius: 10px;
}
.rn-tier span { color: #ccc; font-weight: 600; }
.rn-tier strong { color: #00E676; font-size: 1.2rem; font-weight: 800; }
.rn-tier.max { border-color: #00E676; background: rgba(0, 230, 118, 0.05); }

.rn-micro-text { font-size: 0.8rem; color: var(--text-muted); margin-top: 15px; line-height: 1.5;}

/* ==========================================
   SIDEBAR – PRAWA STRONA Z KUPONAMI
   ========================================== */
.rn-sidebar {
    position: sticky;
    top: 120px;
}

.rn-sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.widget-title {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    font-weight: 700;
}
.widget-title i { color: var(--primary); }

/* --- SCROLL AREA W SIDEBARZE – PŁYNNE PRZEWIJANIE --- */
/* WAŻNE: display:block + explicit height + isolation = działa na każdym serwerze */
.rn-sidebar-scroll-area {
    display: block;
    height: 480px;          /* stała wysokość – niezawodna na live */
    max-height: 65vh;       /* ale nie więcej niż viewport */
    overflow-y: scroll;     /* scroll zamiast auto – zawsze widoczny pasek */
    overflow-x: hidden;
    padding-right: 8px;
    box-sizing: border-box;
    /* Płynne scrollowanie mobile (iOS) */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Izolacja – zapobiega "overflow: hidden" od rodzica */
    isolation: isolate;
    contain: strict;
    will-change: scroll-position;
}

/* Stylowanie scrollbara – webkit */
.rn-sidebar-scroll-area::-webkit-scrollbar {
    width: 5px;
    display: block;
}
.rn-sidebar-scroll-area::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
}
.rn-sidebar-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(230,0,0,0.45);
    border-radius: 10px;
}
.rn-sidebar-scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(230,0,0,0.8);
}
/* Firefox */
.rn-sidebar-scroll-area {
    scrollbar-width: thin;
    scrollbar-color: rgba(230,0,0,0.45) rgba(255,255,255,0.04);
}

/* Fade gradient na dole – wskazuje że można scrollować */
.rn-sidebar-widget {
    position: relative;
    overflow: visible !important; /* nie blokuj scrollowania dzieci */
}
.rn-sidebar-widget::after {
    content: '';
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    height: 50px;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 0 0 16px 16px;
    z-index: 2;
}

/* --- KARTY KUPONÓW W SIDEBARZE --- */
.rn-side-coupon {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}
.rn-side-coupon:last-child { margin-bottom: 0; }
.rn-side-coupon:not(.expired-coupon):hover {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.04);
    transform: translateY(-1px);
}

.side-coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.side-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(230, 0, 0, 0.1);
    color: var(--primary);
    border: 1px solid rgba(230, 0, 0, 0.3);
}
.side-badge.luxury {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
    border-color: rgba(155, 89, 182, 0.3);
}

.side-coupon-code {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
    text-align: center;
    margin: 10px 0;
    word-break: break-all;
}

.side-coupon-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    text-align: center;
    margin-bottom: 12px;
}

/* Wrapper na przyciski */
.side-action-buttons {
    display: flex;
    gap: 8px;
    width: 100%;
}

.rn-copy-btn.side {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.rn-copy-btn.side:not(:disabled):hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    box-shadow: none;
    transform: none;
}

.rn-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 40px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    text-decoration: none;
}
.rn-link-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}
.rn-link-btn img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
}

/* Stan skopiowania */
.rn-copy-btn.copied {
    background: #00E676 !important;
    border-color: #00E676 !important;
    color: #000 !important;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.4) !important;
}

/* ==========================================
   WYGASŁE KUPONY
   ========================================== */
.expired-divider {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    margin: 20px 0 15px;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.expired-divider::before, .expired-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 20%;
    height: 1px;
    background: var(--border-color);
}
.expired-divider::before { left: 5px; }
.expired-divider::after { right: 5px; }

.expired-coupon {
    filter: grayscale(100%);
    opacity: 0.35;
    border-color: #333;
}
.expired-coupon .side-coupon-code {
    text-decoration: line-through;
    color: #888;
}
.expired-coupon .side-badge {
    border-color: #555;
    color: #aaa;
    background: rgba(255,255,255,0.05);
}
.expired-coupon i { color: #888 !important; }
.expired-coupon .rn-copy-btn.side:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    background: transparent;
    color: #666;
}

/* ==========================================
   CTA BOX – REJESTRACJA NA GÓRZE SIDEBARA
   ========================================== */
.rn-sidebar-cta {
    background: linear-gradient(135deg, #1a0000 0%, #0d0d0d 100%);
    border: 1px solid rgba(230, 0, 0, 0.35);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 16px;
    text-align: center;
    box-shadow: 0 0 25px rgba(230, 0, 0, 0.08), 0 8px 25px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}
.rn-sidebar-cta::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 70%; height: 60px;
    background: radial-gradient(ellipse, rgba(230,0,0,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.rn-sidebar-cta-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 12px;
    font-weight: 500;
}
.rn-sidebar-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    padding: 14px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(230, 0, 0, 0.35);
    letter-spacing: 0.3px;
}
.rn-sidebar-cta-btn:hover {
    background: #ff1a1a;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(230, 0, 0, 0.5);
}
.rn-sidebar-cta-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 10px 0 0;
    opacity: 0.7;
}

/* ==========================================
   RESPONSYWNOŚĆ (RWD)
   ========================================== */
@media (max-width: 1100px) {
    .rn-layout-grid {
        grid-template-columns: 1fr;
    }
    .rn-sidebar {
        position: static;
        margin-top: 10px;
    }
    .rn-sidebar-scroll-area {
        height: auto;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .rn-wrapper { margin-top: 100px; padding: 0 15px; }
    .rn-main-title { font-size: 2.8rem; }
    .rn-card-header { padding: 30px 20px; }
    .rn-article-title { font-size: 1.6rem; }
    .rn-content { padding: 25px 20px; }
    .rn-code-box { flex-direction: column; gap: 15px; text-align: center; }
    .rn-copy-btn { width: 100%; box-sizing: border-box; }
    .rn-block-title h4 { font-size: 1.1rem; }
    .rn-sidebar-scroll-area { height: auto; max-height: 450px; }
}

@media (max-width: 480px) {
    .rn-tickets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .rn-main-title { font-size: 2.2rem; }
}