/* Basis-Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0;
    padding: 15px;
    font-family: 'Cambria', serif;
    background: url('images/gainsboro.png') 25% / cover repeat;
    color: blue;
    overflow-x: hidden;
    min-height: 100vh;
    cursor: url('images/herz.png') 16 16, auto;
}

/* Back Button */
.fixed-back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
    text-decoration: none;
    font-size: 28px;
    transition: all 0.3s ease;
    transform: rotate(-90deg);
}

.fixed-back-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: rotate(-90deg) scale(1.1);
}

/* Main Content */
main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    margin: 0 auto;
    max-width: 1200px;
}

/* Main Content - Desktop */
.table-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    font-size: 1.7rem;
}

.table-row {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid red;
    padding: 2px 0;
}

.table-cell {
    padding: 20px;
    text-align: center;
    vertical-align: middle;
    flex: 1;
    min-width: 120px;
}

.table-cell.year {
    flex: 0 0 80px;
    font-weight: bold;
}

.table-cell.title {
    flex: 2;
    min-width: 200px;
    text-align: left;
}

.table-cell.location {
    flex: 1.5;
    min-width: 180px;
    line-height: 1.3;
}

.table-cell.category {
    flex: 1;
    min-width: 150px;
}

.table-cell.location .address {
    font-size: 0.6em;
    display: block;
    margin-top: 5px;
    line-height: 1.2;
}

/* Links */
.title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.title-link:hover {
    color: red !important;
    cursor: url('images/herz.png') 16 16, auto;
}

.italic-word {
    font-style: italic;
    font-size: 16px;
    display: block;
    margin-top: 5px;
}

/* Footer */
footer {
    font-family: 'Cambria', serif;
    font-weight: 900;
    font-size: 10px;
    text-align: center;
    padding: 10px;
    background: transparent;
    color: #0e25f5;
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* Allgemeine Verbesserungen */
body, main, p, div, span {
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Responsive Anpassungen */
@media (max-width: 1199px) {
    .table-container {
        max-width: 95%;
    }
}

@media (max-width: 992px) {
    .table-row {
        padding: 12px 0;
    }
    
    .table-cell {
        padding: 8px;
    }
}

@media (max-width: 768px) {
    html, body {
        padding: 5px;
    }
    
    main {
        padding: 60px 15px 80px;
    }
    
    .table-row {
        position: relative;
        padding-left: 55px; /* Weniger Platz für Jahreszahl */
        margin-bottom: 15px;
        border-bottom: 1px solid rgba(255, 0, 0, 0.3);
    }
    
    .table-cell {
        padding: 3px 0;
        min-width: 100%;
        text-align: left;
        border-bottom: none;
    }
    
    .table-cell.year {
        position: absolute;
        left: 5px; /* Näher am Rand */
        top: 3px; /* Besser an Titel ausgerichtet */
        width: 50px; /* Schmaler */
        padding: 0;
        text-align: left;
        font-weight: bold;
        font-size: 0.9em; /* Etwas kleinere Schrift */
        border-bottom: none;
    }
    
    .table-cell.title {
        padding-top: 0;
        margin-left: -5px; /* Titel näher an Jahreszahl */
    }
    
    .italic-word {
        display: inline;
        margin-left: 5px;
        font-size: 0.8em; /* Kleinere Kursivschrift */
    }
    
    .fixed-back-button {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    /* Spezifische Anpassung für leere Kategorie-Zellen */
    .table-cell.category:empty {
        display: none;
    }
}

@media (max-width: 480px) {
    .table-row {
        padding-left: 60px;
    }
    
    .table-cell.year {
        width: 55px;
    }
    
    .table-cell.location .address {
        font-size: 0.7em;
    }
    
    .fixed-back-button {
        width: 30px;
        height: 30px;
        font-size: 18px;
        top: 10px;
        left: 10px;
    }
    
    footer {
        font-size: 8px;
    }
}
@media (max-width: 414px) {
    html, body {
        padding: 6px;
    }

    .table-row {
        display: block;
        position: relative;
        padding-left: 44px; /* Kompakter Abstand für Jahreszahl */
        margin-bottom: 18px;
        border-bottom: none;
    }

    .table-cell.year {
        position: absolute;
        left: 6px;
        top: 0;
        width: 38px;
        padding: 0;
        font-weight: bold;
        font-size: 15px;
        text-align: left;
        border-bottom: none;
    }

    .table-cell.title {
        display: inline-block;
        width: 100%;
        padding: 0 0 2px 0;
        text-align: left;
        font-size: 18px;
        line-height: 1.3;
    }

    .table-cell.location,
    .table-cell.category {
        padding: 0 0 0 0;
        font-size: 14px;
        line-height: 1.4;
    }

    .italic-word {
        display: inline;
        font-style: italic;
        font-size: 13px;
        margin-left: 4px;
    }

    .address {
        display: block;
        font-size: 12px;
        margin: 2px 0 0 0;
        color: rgba(0, 0, 255, 0.8);
    }

    .fixed-back-button {
        width: 34px;
        height: 34px;
        font-size: 18px;
        top: 10px;
        left: 10px;
    }

    /* Besondere Anpassung für leere Kategorien */
    .table-cell.category:empty {
        display: none;
    }
}