/* Changelog System - Admin Panel Style für Frontend mit Light/Dark Theme Support */

/* CSS Custom Properties - Light Theme (Default) */
:root {
    --changelog-primary: #007bff;
    --changelog-secondary: #6c757d;
    --changelog-success: #28a745;
    --changelog-info: #17a2b8;
    --changelog-warning: #ffc107;
    --changelog-danger: #dc3545;
    --changelog-light: #f8f9fa;
    --changelog-dark: #343a40;
    --changelog-bg: #ffffff;
    --changelog-card-bg: #ffffff;
    --changelog-border: #dee2e6;
    --changelog-text: #212529;
    --changelog-text-muted: #6c757d;
    --changelog-transition: all 0.3s ease;
    --changelog-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --changelog-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.15);
    --changelog-border-radius: 15px;
    --changelog-featured-placeholder-bg: linear-gradient(135deg, var(--changelog-primary), #0056b3);
    --changelog-input-bg: #ffffff;
    --changelog-input-border: #ced4da;
    --changelog-alert-bg: #ffffff;
    --changelog-hover-bg: #f8f9fa;
}

/* Dark Theme */
.theme-dark {
    --changelog-bg: #1a1a1a;
    --changelog-card-bg: #2d2d2d;
    --changelog-border: #404040;
    --changelog-text: #fff;
    --changelog-text-muted: #6c757d;
    --changelog-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    --changelog-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.4);
    --changelog-input-bg: #2a2a2a;
    --changelog-input-border: #404040;
    --changelog-alert-bg: #2d2d2d;
    --changelog-hover-bg: #3a3a3a;
}

/* Container */
.changelog-container {
    background: var(--changelog-bg);
    min-height: 100vh;
    color: var(--changelog-text);
    padding: 2rem 0;
    transition: var(--changelog-transition);
}

/* Featured Changelog - Neuester Eintrag */
.changelog-card-featured {
    margin-bottom: 2rem;
    transition: var(--changelog-transition);
    cursor: pointer;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.changelog-card-featured:hover {
    transform: translateY(-4px);
}

.changelog-card-featured .card {
    background: var(--changelog-card-bg);
    border: 1px solid var(--changelog-border);
    border-radius: var(--changelog-border-radius);
    box-shadow: var(--changelog-shadow);
    overflow: hidden;
    transition: var(--changelog-transition);
    height: 100%;
}

.changelog-card-featured:hover .card {
    box-shadow: var(--changelog-shadow-hover);
    border-color: var(--changelog-primary);
}

.changelog-featured-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.changelog-featured-image {
    position: relative;
    width: 100%;
    height: 350px;
    background: var(--changelog-featured-placeholder-bg);
    overflow: hidden;
}

.changelog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    background: var(--changelog-bg);
}

.changelog-card-featured:hover .changelog-featured-image img {
    transform: scale(1.02);
}

.changelog-featured-placeholder {
    width: 100%;
    height: 100%;
    background: var(--changelog-featured-placeholder-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.changelog-featured-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.changelog-featured-info {
    padding: 2rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.changelog-featured-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--changelog-text);
    line-height: 1.2;
    margin: 0 0 1rem 0;
}

.changelog-featured-version {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--changelog-primary);
    letter-spacing: -2px;
    margin: 0.5rem 0;
}

.changelog-featured-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--changelog-border);
    margin-top: 1rem;
}

.changelog-featured-label {
    background: linear-gradient(135deg, var(--changelog-primary), #0056b3);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.changelog-featured-date {
    font-size: 1rem;
    color: var(--changelog-text-muted);
    font-weight: 500;
}

/* Normale Changelog Cards */
.changelog-card {
    transition: var(--changelog-transition);
    height: 100%;
    cursor: pointer;
}

.changelog-card:hover {
    transform: translateY(-4px);
}

.changelog-card .card {
    background: var(--changelog-card-bg);
    border: 1px solid var(--changelog-border);
    border-radius: var(--changelog-border-radius);
    height: 100%;
    box-shadow: var(--changelog-shadow);
    overflow: hidden;
    transition: var(--changelog-transition);
    max-height: 400px;
}

.changelog-card:hover .card {
    box-shadow: var(--changelog-shadow-hover);
    border-color: var(--changelog-primary);
}

.changelog-image {
    position: relative;
    width: 100%;
    height: 250px;
    background: var(--changelog-featured-placeholder-bg);
    overflow: hidden;
}

.changelog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    background: var(--changelog-bg);
}

.changelog-card:hover .changelog-image img {
    transform: scale(1.02);
}

.changelog-placeholder {
    width: 100%;
    height: 100%;
    background: var(--changelog-featured-placeholder-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.changelog-info {
    padding: 1rem;
    text-align: center;
}

.changelog-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--changelog-text);
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6rem;
}

.changelog-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--changelog-border);
    flex-wrap: wrap;
}

.changelog-version {
    background: linear-gradient(135deg, var(--changelog-primary), #0056b3);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.changelog-date {
    color: var(--changelog-text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Header Section */
.changelog-overview .card {
    background: var(--changelog-card-bg);
    border: 1px solid var(--changelog-border);
    border-radius: var(--changelog-border-radius);
    box-shadow: var(--changelog-shadow);
}

.changelog-overview .card-header {
    background: transparent;
    border-bottom: 1px solid var(--changelog-border);
    padding: 1.5rem;
}

.changelog-overview .card-body {
    padding: 1.5rem;
}

.changelog-overview .card-title {
    color: var(--changelog-text);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.changelog-overview .card-title i {
    color: var(--changelog-primary);
    margin-right: 0.5rem;
}

/* Search Box */
.changelog-search-wrapper {
    max-width: 300px;
}

.changelog-search-wrapper .form-control {
    background: var(--changelog-input-bg);
    border: 1px solid var(--changelog-input-border);
    color: var(--changelog-text);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--changelog-transition);
}

.changelog-search-wrapper .form-control:focus {
    border-color: var(--changelog-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background: var(--changelog-input-bg);
    color: var(--changelog-text);
    outline: none;
}

.changelog-search-wrapper .input-group-text {
    background: var(--changelog-input-bg);
    border: 1px solid var(--changelog-input-border);
    color: var(--changelog-text-muted);
    border-left: none;
    border-radius: 0 8px 8px 0;
}

/* Detail View */
.changelog-detail .card {
    background: var(--changelog-card-bg);
    border: 1px solid var(--changelog-border);
    border-radius: var(--changelog-border-radius);
    box-shadow: var(--changelog-shadow);
}

.changelog-detail .card-header {
    background: transparent;
    border-bottom: 1px solid var(--changelog-border);
    padding: 1.5rem;
}

.changelog-detail .card-body {
    padding: 2rem;
}

.changelog-detail-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: var(--changelog-border-radius) var(--changelog-border-radius) 0 0;
}

.changelog-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Markdown Body */
.markdown-body {
    color: var(--changelog-text);
    line-height: 1.7;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    color: var(--changelog-text);
    border-bottom: 2px solid var(--changelog-border);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.markdown-body code {
    background: var(--changelog-hover-bg);
    color: var(--changelog-text);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid var(--changelog-border);
}

.markdown-body pre {
    background: var(--changelog-hover-bg);
    border: 1px solid var(--changelog-border);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

.markdown-body blockquote {
    border-left: 4px solid var(--changelog-primary);
    background: rgba(0, 123, 255, 0.1);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.markdown-body a {
    color: var(--changelog-primary);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .changelog-featured-content {
        flex-direction: column;
    }

    .changelog-featured-image {
        height: 250px;
    }

    .changelog-featured-info {
        padding: 1.5rem;
    }

    .changelog-featured-title {
        font-size: 1.5rem;
    }

    .changelog-featured-version {
        font-size: 2rem;
    }

    .changelog-featured-meta {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .changelog-meta {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .changelog-title {
        font-size: 0.95rem;
    }

    .changelog-overview .card-header {
        padding: 1rem;
    }

    .changelog-overview .card-title {
        font-size: 1.5rem;
    }

    .changelog-search-wrapper {
        max-width: 100%;
        margin-top: 1rem;
    }

    /* Upload Interface Mobile */
    .uploaded-images-gallery {
        grid-template-columns: 1fr;
    }

    .image-position-examples {
        gap: 0.5rem;
    }

    .position-example {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .changelog-image {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .changelog-container {
        padding: 1rem 0;
    }

    .changelog-featured-title {
        font-size: 1.3rem;
    }

    .changelog-featured-version {
        font-size: 1.8rem;
    }

    .changelog-featured-image {
        height: 200px;
    }

    .changelog-featured-info {
        padding: 1rem;
    }

    .changelog-info {
        padding: 0.75rem;
    }

    .changelog-title {
        font-size: 0.9rem;
        min-height: 2rem;
    }

    .changelog-image {
        height: 180px;
    }

    .changelog-card .card {
        max-height: 380px;
    }
}

/* Loading Animation */
.changelog-item {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty State */
.alert {
    background: var(--changelog-alert-bg);
    border: 1px solid var(--changelog-border);
    border-radius: var(--changelog-border-radius);
    color: var(--changelog-text);
    padding: 1.5rem;
}

.alert-info {
    border-left: 4px solid var(--changelog-info);
    background: rgba(23, 162, 184, 0.1);
}

/* Dark theme specific adjustments for alerts */
.theme-dark .alert-info {
    background: rgba(23, 162, 184, 0.2);
}

/* Buttons */
.btn-outline-secondary {
    border: 1px solid var(--changelog-border);
    color: var(--changelog-text);
    background: transparent;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: var(--changelog-transition);
}

.btn-outline-secondary:hover {
    background: var(--changelog-hover-bg);
    color: var(--changelog-text);
    text-decoration: none;
    border-color: var(--changelog-primary);
}

/* Image Upload Interface */
.image-upload-container {
    background: var(--changelog-card-bg);
    border: 1px solid var(--changelog-border);
    border-radius: var(--changelog-border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.image-upload-section h4 {
    color: var(--changelog-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-upload-section h4 i {
    color: var(--changelog-primary);
}

.image-upload-area {
    position: relative;
    border: 2px dashed var(--changelog-border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: var(--changelog-transition);
    margin-bottom: 1.5rem;
    background: var(--changelog-hover-bg);
}

.image-upload-area:hover,
.image-upload-area.drag-over {
    border-color: var(--changelog-primary);
    background: rgba(0, 123, 255, 0.05);
}

.image-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.image-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--changelog-text);
}

.image-upload-label i {
    font-size: 2rem;
    color: var(--changelog-primary);
}

.image-upload-label span {
    font-size: 1.1rem;
    font-weight: 600;
}

.image-upload-label small {
    color: var(--changelog-text-muted);
    font-size: 0.9rem;
}

/* Uploaded Images Gallery */
.uploaded-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.uploaded-image-item {
    background: var(--changelog-hover-bg);
    border: 1px solid var(--changelog-border);
    border-radius: 8px;
    padding: 1rem;
    transition: var(--changelog-transition);
}

.uploaded-image-item:hover {
    border-color: var(--changelog-primary);
    box-shadow: var(--changelog-shadow);
}

.uploaded-image-item .image-preview {
    width: 100%;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: var(--changelog-bg);
    border: 1px solid var(--changelog-border);
}

.uploaded-image-item .image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uploaded-image-item .image-details {
    margin-bottom: 0.75rem;
}

.uploaded-image-item .image-name {
    font-weight: 600;
    color: var(--changelog-text);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.uploaded-image-item .image-id {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--changelog-primary);
    margin-bottom: 0.25rem;
}

.uploaded-image-item .image-size {
    font-size: 0.75rem;
    color: var(--changelog-text-muted);
    font-style: italic;
}

.uploaded-image-item .image-actions {
    display: flex;
    gap: 0.5rem;
}

/* Image Position Examples */
.image-position-examples {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.position-example {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--changelog-border);
}

.position-example:last-child {
    border-bottom: none;
}

.position-example code {
    background: var(--changelog-bg);
    color: var(--changelog-primary);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
    border: 1px solid var(--changelog-border);
}

.position-example span {
    color: var(--changelog-text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* Upload Notifications */
.upload-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--changelog-card-bg);
    border: 1px solid var(--changelog-border);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    min-width: 300px;
    box-shadow: var(--changelog-shadow-hover);
    animation: slideInRight 0.3s ease;
}

.upload-notification.success {
    border-left: 4px solid var(--changelog-success);
}

.upload-notification.error {
    border-left: 4px solid var(--changelog-danger);
}

.upload-notification.fade-out {
    animation: slideOutRight 0.3s ease;
}

.upload-notification i {
    color: var(--changelog-primary);
    font-size: 1.2rem;
}

.upload-notification.success i {
    color: var(--changelog-success);
}

.upload-notification.error i {
    color: var(--changelog-danger);
}

.upload-notification span {
    color: var(--changelog-text);
    flex: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Content Images - Verschiedene Positionen */
.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: var(--changelog-shadow);
    transition: var(--changelog-transition);
    border: 1px solid var(--changelog-border);
}

.markdown-body img:hover {
    box-shadow: var(--changelog-shadow-hover);
    transform: translateY(-2px);
}

/* Zentrierte Bilder */
.markdown-body img[title="center"] {
    display: block;
    margin: 2rem auto;
    text-align: center;
}

/* Linksbündige Bilder */
.markdown-body img[title="left"] {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
    max-width: 300px;
}

/* Rechtsbündige Bilder */
.markdown-body img[title="right"] {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
    max-width: 300px;
}

/* Vollbreite Bilder */
.markdown-body img[title="full"] {
    width: 100%;
    margin: 2rem 0;
    border-radius: 12px;
}

/* Clearfix für Float-Bilder */
.markdown-body p:after {
    content: "";
    display: table;
    clear: both;
}

/* Mobile Responsive für Content-Bilder */
@media (max-width: 768px) {
    .markdown-body img[title="left"],
    .markdown-body img[title="right"] {
        float: none;
        display: block;
        margin: 1rem auto;
        max-width: 100%;
    }

    .uploaded-images-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .dialog-content {
        margin: 0.5rem;
        padding: 1.5rem;
    }

    .dialog-actions {
        flex-direction: column;
    }

    .image-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
} 