* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #050816;
    color: #f5f5f5;
}

body {
    position: relative;
    overflow-x: hidden;
}

/* Tło animowane */
.bg-animation {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, #3b82f6 0, transparent 55%),
                radial-gradient(circle at 100% 100%, #a855f7 0, transparent 55%),
                radial-gradient(circle at 0% 100%, #f97316 0, transparent 55%);
    opacity: 0.15;
    filter: blur(8px);
    animation: bg-move 18s infinite alternate;
    z-index: -1;
}

@keyframes bg-move {
    0% { transform: translate3d(0,0,0) scale(1); }
    50% { transform: translate3d(0,-20px,0) scale(1.03); }
    100% { transform: translate3d(0,20px,0) scale(1.05); }
}

/* Layout */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 7vw;
    backdrop-filter: blur(16px);
    background: rgba(5,8,22,0.95);
    border-bottom: 1px solid rgba(148,163,184,0.25);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center; /* Ważne dla logo obrazkowego */
}

.logo-highlight {
    color: #3b82f6;
}

.main-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.main-nav a {
    text-decoration: none;
    color: #e5e7eb;
    font-weight: 500;
    position: relative;
    padding: 10px 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: color 0.25s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 4px;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #3b82f6, #a855f7);
    transition: width 0.25s ease;
}

.main-nav a:hover {
    color: #fff;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a.active {
    color: #fff;
}

.yt-link {
    display: inline-flex !important;
    align-items: center;
    padding: 0 10px;
}

.yt-link .yt-icon {
    width: 28px;
    height: 28px;
    fill: #fff;
    transition: 0.2s;
}

.yt-link:hover .yt-icon {
    fill: #ff0000;
    transform: scale(1.1);
}

.content {
    padding: 24px 7vw 48px 7vw;
}

/* Przycisk */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    outline: none;
}

.btn.primary {
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    color: #f9fafb;
    box-shadow: 0 10px 25px rgba(59,130,246,0.35);
}

.btn.secondary {
    background: transparent;
    color: #e5e7eb;
    border-color: rgba(148,163,184,0.7);
}

.btn.danger {
    background: rgba(239,68,68,0.1);
    color: #fecaca;
    border-color: rgba(239,68,68,0.8);
}

.btn.tiny {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 999px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(15,23,42,0.6);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.5fr);
    gap: 32px;
    align-items: stretch;
    margin-top: 18px;
}

.hero-text h1 {
    font-size: 2.4rem;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #e5e7eb, #60a5fa);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-text p {
    color: #cbd5f5;
    max-width: 540px;
    line-height: 1.6;
}

.hero-buttons {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

/* Panel najbliższych meczów */
.hero-panel {
    background: radial-gradient(circle at top, rgba(59,130,246,0.15), rgba(15,23,42,0.98));
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,0.4);
    padding: 18px;
    box-shadow: 0 20px 40px rgba(15,23,42,0.8);
    animation: float 8s infinite ease-in-out;
}

.hero-panel h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.match-list {
    list-style: none;
    margin-top: 8px;
}

/* Karty meczowe */
.match-card {
    background: rgba(15,23,42,0.95);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(148,163,184,0.4);
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: fade-in 0.5s ease forwards;
}

.match-card.small {
    font-size: 0.82rem;
}

/* NOWE: Styl dla zakończonych meczów (Wyniki) */
.match-card.finished {
    border-color: rgba(168, 85, 247, 0.5);
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.05), rgba(15,23,42,0.95));
}

.match-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #9ca3af;
}

.match-body {
    margin-top: 4px;
}

.match-time {
    font-size: 0.85rem;
    color: #9ca3af;
}

.match-date {
    font-size: 0.85rem;
    color: #9ca3af;
}

.match-round {
    font-size: 0.85rem;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.match-teams {
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.vs {
    color: #f97316;
    font-size: 0.8rem;
}

/* NOWE: Wyświetlanie wyniku w karcie meczu */
.score-display {
    font-weight: bold;
    color: #a855f7;
    margin: 0 8px;
    font-size: 1.1em;
}

/* Sekcja Stream */
.stream-section {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(4px);
    border-radius: 15px;
    text-align: center;
}

.stream-box iframe {
    border-radius: 15px;
}

/* Drużyny */
h1, h2 {
    margin-bottom: 10px;
}

.teams-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.team-card {
    background: rgba(15,23,42,0.96);
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(148,163,184,0.5);
    box-shadow: 0 16px 28px rgba(15,23,42,0.9);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.team-card::before {
    content: '';
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at top, rgba(56,189,248,0.18), transparent 50%);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.team-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 40px rgba(15,23,42,1);
    border-color: rgba(96,165,250,0.9);
}

.team-card:hover::before {
    opacity: 1;
    transform: translateY(0);
}

.team-card h2 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.team-tag {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-left: 4px;
}

.team-details {
    margin-top: 6px;
    font-family: "JetBrains Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.78rem;
    color: #e5e7eb;
    white-space: pre-line;
}

/* Terminarz */
.day-block {
    margin-top: 18px;
}

.match-grid {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

/* --- NOWE: SEKCA NEWSÓW --- */
.news-item {
    background: rgba(15,23,42,0.95);
    border: 1px solid rgba(148,163,184,0.4);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    animation: fade-in 0.5s ease forwards;
}

.news-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #3b82f6, #a855f7);
}

.news-date {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-content {
    margin-top: 12px;
    line-height: 1.7;
    color: #e5e7eb;
}

/* Obsługa obrazków i wideo wewnątrz newsa */
.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 15px;
    display: block;
}

.news-content iframe {
    max-width: 100%;
    margin-top: 15px;
    border-radius: 8px;
}
/* ------------------------ */

/* Admin */
.admin-login, .admin-section {
    margin-top: 18px;
    background: rgba(15,23,42,0.96);
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(148,163,184,0.6);
    box-shadow: 0 18px 32px rgba(15,23,42,0.9);
}

.admin-top {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-msg {
    margin-bottom: 10px;
    color: #fbbf24;
}

.admin-tabs {
    margin-top: 16px;
    display: inline-flex;
    background: rgba(15,23,42,0.96);
    padding: 3px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.8);
}

.admin-tabs a {
    text-decoration: none;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 999px;
    color: #e5e7eb;
    transition: background 0.18s ease, color 0.18s ease;
}

.admin-tabs a.active {
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    color: #f9fafb;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.82rem;
}

.admin-table th,
.admin-table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(55,65,81,0.8);
}

.admin-table th {
    text-align: left;
    color: #9ca3af;
    font-weight: 500;
}

.admin-form {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.admin-form label {
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid rgba(75,85,99,0.9);
    background: rgba(15,23,42,0.9);
    color: #e5e7eb;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59,130,246,0.5);
    background: rgba(15,23,42,1);
}

/* Stopka */
.site-footer {
    padding: 18px 7vw 22px 7vw;
    font-size: 0.8rem;
    color: #9ca3af;
    border-top: 1px solid rgba(148,163,184,0.3);
    background: rgba(5,8,22,0.96);
    margin-top: 16px;
}

/* Animacje */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        order: -1;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .main-nav {
        display: flex;
        flex-wrap: wrap;
    }

    .main-nav a {
        margin-left: 0;
        margin-right: 12px;
    }
}

@media (max-width: 600px) {
    .content {
        padding-inline: 16px;
    }

    .site-header {
        padding-inline: 16px;
    }

    .site-footer {
        padding-inline: 16px;
    }
}