body {
    background: #f6f6f6;
    padding: 0;
    margin: 0;
    font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #272727;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;  
}

h1 {
    font-family: Segoe UI, sans-serif;
    font-weight: 300;
    line-height: 36px;
}

a {
    color: #1177aa;
    text-decoration: none;
}

a:hover {
    color: #7b7b7b;    
}

input[type=text], textarea, input[type=password] {
    padding: 7.5px;
    background: #fff;
    border: 1px solid #eaeaea;
    outline: 0;
    border-radius: 2px;
    width: 78%;
}

input[type=submit] {
    background: #1177aa;
    color: #fff;
    padding: 6.5px;
    border: 1px solid #1177aa;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 2px;
    cursor: pointer;
}

input[type=submit]:hover {
    background: #0f6691;
}

#wrapper {
    width: 800px;
    margin: auto;
    padding-top: 40px;
    display: flex;
    flex-wrap: wrap;
}

#inner-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

#wrapper header {
    padding-top: 40px;
    padding-right: 40px;
    width: 160px;
    text-align: right;
    flex: 0 0 160px;
    position: sticky;
    top: 40px;
    align-self: flex-start;
}

#wrapper header .logo img {
    max-width: 100%;
    height: auto;
}

#wrapper header nav {
    margin-top: 20px;
}

header nav ul {
    padding: 0;
    margin: 0;
    list-style-type: none;
}

header nav ul li {
    display: block;
    padding-top: 15px;
}

header nav ul li a {
    color: #777;    
    text-decoration: none;
    display: inline-block;
    padding-bottom: 5px;
    border-bottom: 2px solid #e0e0e0;
}

header nav ul li a:hover {
    border-bottom: 2px solid #1177aa;
}

header nav input[type=text] {
    background: none;
    padding: 0;
    padding-bottom: 5px;
    border: 0;
    border-bottom: 2px solid #e0e0e0;
    width: 90px;
    text-align: right;
    font-size: 14px;
    font-family: sans-serif;
    border-radius: 0;
}

header nav input[type=text]:focus {
    border-bottom: 2px solid #1177aa;    
}

#content {
    width: 640px;
    padding-top: 40px;
    flex: 1;
}

#content .post {
    line-height: 26px;
    margin-top: 60px;
    color: #444;
    padding: 40px;
    background: #fff;
    box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* Dynamische Textfarbe basierend auf Hintergrundfarbe */
#content .post[style*="background-color: #fff"],
#content .post[style*="background-color: #ffffff"] {
    color: #444;
}

#content .post:not([style*="background-color: #fff"]):not([style*="background-color: #ffffff"]) {
    color: #fff;
}

#content .post:not([style*="background-color: #fff"]):not([style*="background-color: #ffffff"]) .date a,
#content .post:not([style*="background-color: #fff"]):not([style*="background-color: #ffffff"]) .title h1 a,
#content .post:not([style*="background-color: #fff"]):not([style*="background-color: #ffffff"]) .reading-time {
    color: #fff;
}

/* Spezifische Regel für Suchergebnisse-Überschrift */
#content .post .title .search-header {
    color: #272727; /* Dunkle Farbe für Lesbarkeit auf weißem Hintergrund */
}

/* Sicherstellen, dass .title selbst keine dynamische Farbe überschreibt */
#content .post .title {
    font-size: 12px;
    color: #7b7b7b; /* Standardfarbe für andere Elemente in .title */
    margin-bottom: 20px;
    margin-top: 5px;
}

#content .post:not([style*="background-color: #fff"]):not([style*="background-color: #ffffff"]) .meta {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

#content .post:not([style*="background-color: #fff"]):not([style*="background-color: #ffffff"]) .meta .like_button a,
#content .post:not([style*="background-color: #fff"]):not([style*="background-color: #ffffff"]) .meta .share_button a {
    color: #ccc;
}

#content .post:not([style*="background-color: #fff"]):not([style*="background-color: #ffffff"]) .meta .like_button a:hover,
#content .post:not([style*="background-color: #fff"]):not([style*="background-color: #ffffff"]) .meta .share_button a:hover {
    color: #66b3ff;
}

#content .post:not([style*="background-color: #fff"]):not([style*="background-color: #ffffff"]) .tags a {
    background: rgba(255, 255, 255, 0.2);
}

#content .post:not([style*="background-color: #fff"]):not([style*="background-color: #ffffff"]) .tags a:hover {
    background: #66b3ff;
}

#content .post:first-child {
    margin-top: 0;
}

#content .post .date {
    display: inline-block;
    margin-left: -40px;
    padding-left: 40px;
}

#content .post .date a {
    color: #9b9b9b;
    padding-bottom: 5px;
}

#content .post .date a:hover {
    color: #1177aa;
}

#content .post .title h1 {
    font-size: 26px;
    margin: 0;
    padding: 0;
color: #7b7b7b;
}

#content .post .title h1 a {
    color: #272727;
    text-decoration: none;
    font-weight: 300;
}

#content .post .title h1 a:hover {
    color: #1177aa;    
}

#content .post .title .reading-time {
    font-size: 12px;
    color: #7b7b7b;
    display: block;
    margin-top: 5px;
}

#content .post .photo {
    text-align: center;
    margin-bottom: 20px;
}

#content .post .photo img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: auto;
}

#content .meta {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    margin-top: 40px;
    margin-bottom: 5px;
    font-size: 12px;
    height: auto;
    opacity: 0.5;
    -webkit-transition: all 0.5s ease-in-out;
    -moz-transition: all 0.5s ease-in-out;
    -ms-transition: all 0.5s ease-in-out;
    -o-transition: all 0.5s ease-in-out;
    transition: all 0.5s ease-in-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#content .meta:hover {
    opacity: 1;    
}

#content .meta .meta-left {
    display: flex;
    align-items: center;
}

#content .meta .meta-right {
    display: flex;
    align-items: center;
}

#content .meta .like_button {
    display: inline-block;
    vertical-align: bottom;
    margin-right: 10px;
}

#content .meta .like_button a {
    background: none;
    color: #999;
    padding: 0;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
}

#content .meta .like_button a:hover {
    color: #1177aa;
}

#content .meta .like_button a.liked {
    color: #e74c3c;
}

#content .meta .like_button a svg {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

#content .meta .share_button {
    display: inline-block;
    vertical-align: bottom;
    margin-right: 10px;
}

#content .meta .share_button a {
    background: none;
    color: #999;
    padding: 0;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
}

#content .meta .share_button a:hover {
    color: #1177aa;
}

#content .meta .share_button a svg {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

#content .tags a {
    padding: 5px;
    padding-left: 10px;
    padding-right: 10px;
    background: #999;
    color: #fff;
    border-radius: 2px;
    box-shadow: 0px 1px 0px #fff;
    text-decoration: none;
    margin-left: 5px;
}

#content .tags a:hover {
    background: #1177aa;
}

#content .spinner {
    padding: 40px;
    font-size: 12px;
    text-shadow: 0px 1px 0px #fff;
}

footer {
    border-top: 2px solid #e0e0e0;
    padding-bottom: 40px;
    margin-top: 40px;
    position: relative;
    background: none;
    width: 100%;
}

footer .description {
    width: 100%;
    float: none;
}

footer .copyright {
    text-align: center;
    margin-top: 40px;
    text-shadow: 0px 1px 0px #fff;
    color: #9b9b9b;
    font-size: 12px;
}

footer h2 {
    font-weight: 300;
    text-shadow: 0px 1px 0px #fff;
}

.spinner a {
    padding: 5px;
    padding-left: 10px;
    padding-right: 10px;
    background: #1177aa;
    color: #fff;
    box-shadow: 0px 1px 0px #fff;
    text-shadow: none;
    border-radius: 2px;
    text-decoration: none;
}

.spinner a.grey {
    background: #999;
    color: #fff;
}

/* Admin-spezifische Stile */
#content .text label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#content .text input[type=text],
#content .text textarea {
    width: 100%;
    margin-bottom: 10px;
}

#content .text input[type=file] {
    margin-bottom: 10px;
}

#content .text ul {
    list-style-type: none;
    padding: 0;
}

#content .text ul li {
    margin-bottom: 10px;
}

@media screen and (max-width: 800px) and (orientation: portrait) {
    #wrapper {
        width: auto;
        flex-direction: column;
    }

    #inner-wrapper {
        flex-direction: column;
    }

    #wrapper header {
        width: 100%;
        padding: 0;
        padding-bottom: 60px;
        padding-top: 40px;
        text-align: center;
        border: 0;
        position: static;
    }

    #wrapper header ul li a {
        margin-left: 10px;
        margin-right: 10px;
    }

    #wrapper header ul li input[type=text] {
        margin-left: 10px;
        margin-right: 10px;
        text-align: center;
    }

    #wrapper #content {
        width: 90%;
        margin: auto;
        flex: none;
    }

    #content .meta {
        flex-direction: column;
        align-items: flex-start;
    }

    #content .meta .meta-right {
        margin-top: 10px;
    }
}

.clear {clear: both;}