body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #0d0d0d;
    color: white;
}

a {
    color: white;
    text-decoration: none;
}

.hero {
    height: 60vh;
    background: url('polska.jpg') center/cover fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 60px;
    margin: 0;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
}

.filters {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.filters input, .filters select {
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    background: #1c1c1c;
    color: white;
}

.add-btn {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 20px;
    background: #ff0000;
    border-radius: 8px;
    font-size: 18px;
    transition: 0.3s;
}

.add-btn:hover {
    background: #cc0000;
}

.back {
    display: block;
    padding: 15px;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: auto;
    padding: 40px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: red;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px;
    opacity: 0;
    transform: translateY(40px);
    transition: 0.6s;
    cursor: pointer;
}

.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }

.timeline-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    background: red;
    border-radius: 50%;
    top: 25px;
    right: -3px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -9px;
}

.timeline-content {
    background: #1c1c1c;
    padding: 20px;
    border-radius: 12px;
    transition: 0.3s;
}

.timeline-content:hover {
    transform: scale(1.05);
}

.timeline-content img.thumb {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}

.era {
    color: #ff4d4d;
    font-size: 14px;
}

.event-page {
    max-width: 800px;
    margin: auto;
    padding: 30px;
}

.event-img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
}

.line {
    height: 3px;
    background: red;
    margin: 15px 0;
}

.edit-btn {
    display: inline-block;
    padding: 12px 20px;
    background: #0077ff;
    border-radius: 8px;
    margin-top: 20px;
}

.form-container {
    max-width: 700px;
    margin: 40px auto;
    background: #1c1c1c;
    padding: 30px;
    border-radius: 12px;
}

.form-container h1 {
    text-align: center;
    margin-bottom: 20px;
}

form label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

form input, form textarea, form select {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border-radius: 8px;
    border: none;
    background: #2a2a2a;
    color: white;
}

textarea {
    height: 150px;
}

.submit-btn {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    background: red;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    color: white;
}

.date-row {
    display: flex;
    gap: 10px;
}

.postacie-list {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.postac-card {
    background: #1c1c1c;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: 0.3s;
    border: 2px solid #2a2a2a;
}

.postac-card:hover {
    transform: translateY(-6px);
    border-color: red;
}

.postac-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}

.more-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 16px;
    background: #0077ff;
    border-radius: 8px;
}

.postac-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.postac-img-big {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 20px;
}

.postac-container h1 {
    font-size: 40px;
    margin-bottom: 5px;
}

.postac-container p {
    font-size: 18px;
    line-height: 1.6;
}

.related-events {
    margin-top: 30px;
}

.related-events ul {
    list-style: none;
    padding: 0;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal {
    background: #1c1c1c;
    width: 90%;
    max-width: 650px;
    padding: 25px;
    border-radius: 12px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 26px;
    cursor: pointer;
}

.modal-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
}

.modal-date {
    color: #ff4d4d;
    margin: 5px 0 10px;
}

.timeline-item {
    width: 48%;  
}

.timeline-item:nth-child(even) {
    left: 52%;         
}

.timeline-item:nth-child(odd) {
    left: -3%;
}

.event-btn {
    display: inline-block;
    padding: 10px 16px;
    background: #ff0000;
    color: white;
    border-radius: 8px;
    font-size: 16px;
    margin: 6px 0;
    transition: 0.3s;
}

.event-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
}

.imie{
    font-size: 10px !important;
}

.sort-btn {
    display: inline-block;
    padding: 12px 22px;
    background: linear-gradient(90deg, #a64aff, #7a2cff);
    color: white;
    border-radius: 10px;
    font-size: 18px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    box-shadow: 0 0 10px rgba(150, 0, 255, 0.4);
}

.sort-btn:hover {
    background: linear-gradient(90deg, #b56aff, #8a3cff);
    transform: translateY(-2px);
    box-shadow: 0 0 14px rgba(150, 0, 255, 0.6);
}
