:root {
    --primary: #00529F; /* Lech Poznań Blue */
    --primary-light: #0077E5;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --success: #10b981;
    --warning: #f59e0b;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 82, 159, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent);
    font-weight: 400;
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Main */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 5%;
}

.loading-state {
    text-align: center;
    padding: 5rem 0;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

/* Event Card */
.event-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5), 0 0 20px rgba(0, 82, 159, 0.3);
    border-color: rgba(56, 189, 248, 0.3);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.event-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 140px;
    width: 100%;
}

.event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.event-date {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-top-left-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.event-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.event-badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-stats-main {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-box {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat-box.highlight {
    background: linear-gradient(135deg, rgba(0, 82, 159, 0.4) 0%, rgba(56, 189, 248, 0.1) 100%);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

.highlight .stat-value {
    color: var(--accent);
}

.progress-container {
    width: 100%;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.event-details h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.tribunes-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.tribunes-list li {
    display: flex;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
    padding: 0.5rem;
    border-radius: 6px;
}

.interesting-section p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.interesting-section span {
    font-weight: 600;
    color: var(--accent);
}

.btn-buy {
    display: block;
    width: 100%;
    padding: 1rem;
    text-align: center;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
    margin-top: auto;
}

.btn-buy:hover {
    background: var(--primary-light);
}

@media (max-width: 768px) {
    .event-stats-main {
        grid-template-columns: 1fr;
    }
    .tribunes-list {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
}

.close-modal:hover {
    color: var(--text);
}

.map-container {
    width: 100%;
    height: 60vh;
    margin-top: 1rem;
    position: relative;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
}

#stadium-svg {
    width: 100%;
    height: 100%;
}

.polygon-sector {
    cursor: pointer;
    transition: opacity 0.2s;
    stroke: rgba(255,255,255,0.1);
    stroke-width: 20;
}

.polygon-sector:hover {
    opacity: 0.7;
    stroke: #fff;
    stroke-width: 100;
}

.sector-label {
    font-size: 800px;
    font-weight: 800;
    fill: rgba(255,255,255,0.6);
    text-anchor: middle;
    dominant-baseline: central;
    transition: 0.2s;
}

.polygon-sector:hover + .sector-label,
.sector-label:hover {
    fill: #ffffff;
    font-size: 1000px;
}

.tooltip {
    position: absolute;
    background: #fff;
    color: #333;
    border-radius: 8px;
    pointer-events: none;
    z-index: 1001;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    overflow: hidden;
    width: 250px;
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
}

.tooltip-badge {
    background: var(--primary);
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9rem;
}

.tooltip-image-container {
    position: relative;
    width: 100%;
    height: 140px;
    background: #f1f5f9;
}

.tooltip-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tooltip-sector-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255,255,255,0.9);
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-map {
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: 0.2s;
}

.btn-map:hover {
    background: rgba(255,255,255,0.2);
}
