* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #e91e63;
    --light-color: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
    --spacing: 1rem;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
}

.site-logo {
    height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a2a2a 100%);
    color: white;
    padding: 100px 20px;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #c2185b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Portfolio */
.portfolio {
    padding: 60px 20px;
    background-color: var(--light-color);
}

.portfolio h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

/* Portfolio Upload */
.portfolio-upload {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    text-align: center;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

#portfolioImageInput {
    flex: 1;
    min-width: 200px;
}

#uploadPortfolioBtn {
    white-space: nowrap;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.gallery-item {
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.portfolio-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    font-weight: bold;
    border-radius: 8px;
}

/* Instagram Section */
.instagram-section {
    padding: 60px 20px;
    background-color: white;
    text-align: center;
}

.instagram-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.instagram-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 15px 30px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.instagram-link:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.instagram-icon {
    width: 30px;
    height: 30px;
}

/* Blog Section */
.blog-section {
    padding: 60px 20px;
    background-color: var(--light-color);
    min-height: 100vh;
}

.blog-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Form für neue Beiträge */
.new-post-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.new-post-form h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px rgba(233, 30, 99, 0.3);
}

/* Blog Posts */
.blog-posts {
    display: grid;
    gap: 2rem;
}

.blog-post {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.post-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.post-content {
    padding: 2rem;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.post-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.post-category {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.post-text {
    color: #555;
    margin: 1.5rem 0;
    line-height: 1.8;
    cursor: pointer;
    transition: color 0.3s;
}

.post-text:hover {
    color: var(--secondary-color);
}

.post-actions {
    display: flex;
    gap: 1rem;
}

.delete-btn {
    padding: 8px 15px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background-color: #c82333;
}

.btn-read-more {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-read-more:hover {
    background-color: #c2185b;
}

.post-title-wrapper {
    cursor: pointer;
    transition: opacity 0.3s;
}

.post-title-wrapper:hover h2 {
    color: var(--secondary-color);
}

/* Login/Register Seite */
.login-section {
    padding: 40px 20px;
    background-color: var(--light-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.login-tabs {
    display: flex;
    background-color: var(--light-color);
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
    background-color: white;
}

.tab-btn:hover {
    color: var(--secondary-color);
}

.tab-content {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
}

.form-message {
    margin-top: 1rem;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 0.9rem;
    display: none;
}

.form-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-group small {
    display: block;
    margin-top: 3px;
    font-size: 0.8rem;
    color: #999;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login/Logout Links in Navigation */
.user-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
}

.logged-in-user {
    color: white;
    font-weight: 500;
}

.logout-btn {
    padding: 5px 12px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c2185b;
}

.login-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.login-link:hover {
    color: var(--secondary-color);
}

/* Login-Aufforderung im Blog */
.login-prompt {
    background: white;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.login-prompt h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-prompt p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Post-Autor */
.post-author {
    font-size: 0.85rem;
    color: #999;
}

/* Post Detail */
.post-detail {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Back Link */
.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 0.8;
}

.detail-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.detail-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.detail-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.detail-content {
    padding: 2rem;
    line-height: 1.8;
    color: #555;
    font-size: 1.05rem;
}

.detail-content br {
    content: '';
}

.detail-actions {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
}

.error {
    text-align: center;
    color: #dc3545;
    padding: 2rem;
    background: white;
    border-radius: 8px;
}

.loading {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.no-posts {
    text-align: center;
    color: #666;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .user-display {
        gap: 0.5rem;
        margin-top: 0.5rem;
        width: 100%;
    }

    .logout-btn {
        padding: 3px 8px;
        font-size: 0.75rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .portfolio h2,
    .blog-section h1 {
        font-size: 1.5rem;
    }

    .blog-post {
        margin-bottom: 1rem;
    }

    .post-image {
        height: 200px;
    }

    .post-header {
        flex-direction: column;
    }

    .login-container {
        max-width: 100%;
        margin: 0 20px;
    }

    .detail-header h1 {
        font-size: 1.8rem;
    }
}

/* Modal - Nutzungsbedingungen */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    width: 95%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 1rem;
}

.modal-text {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #555;
    font-size: 0.95rem;
}

.modal-text ul {
    margin: 1rem 0 1rem 1.5rem;
}

.modal-text li {
    margin-bottom: 0.5rem;
}

.modal-text p {
    margin-bottom: 0.8rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 12px 30px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

/* Animationen */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}