/* Import futuristische Schriftarten von Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Audiowide&display=swap');

:root {
    /* Default accent color is purple */
    --accent-color: #9333ea;
    --accent-color-light: rgba(147, 51, 234, 0.2);
    --accent-color-shadow: rgba(147, 51, 234, 0.12);
    --accent-color-hover: rgba(147, 51, 234, 0.18);

    /* Font families */
    --font-primary: 'Rajdhani', sans-serif;
    --font-heading: 'Orbitron', sans-serif;
    --font-accent: 'Chakra Petch', sans-serif;
    --font-special: 'Audiowide', cursive;

    /* Light mode colors */
    --background: #ffffff;
    --foreground: #0f172a;
    --card-background: #ffffff;
    --muted-foreground: #64748b;
    --border: #e2e8f0;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 8px 12px rgba(0, 0, 0, 0.08);
}

.dark-mode {
    --background: #0f172a;
    --foreground: #e2e8f0;
    --card-background: #1e293b;
    --muted-foreground: #94a3b8;
    --border: #334155;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    --hover-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background);
    color: var(--foreground);
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    padding-bottom: 80px; /* Space for the bottom navbar */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: var(--font-special);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 0 15px var(--accent-color-light);
}

.gradient-text {
    background: linear-gradient(to right, var(--accent-color-light), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Grid layout for downloads */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    grid-auto-rows: min-content;
    align-items: start;
}

@media (min-width: 640px) {
    .downloads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .downloads-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .downloads-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Layout Improvements */
@media (max-width: 768px) {
    .downloads-grid {
        padding: 16px;
        gap: 16px;
    }
    
    .file-card {
        width: calc(100% - 16px);
        margin: 8px;
        border-radius: 12px;
        max-width: 100%;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .file-card-header {
        height: 140px;
        border-radius: 12px 12px 0 0;
    }
    
    .file-card-content {
        padding: 15px;
    }
    
    .file-name {
        font-size: 1.15rem;
        margin-bottom: 6px;
    }
    
    .file-description {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    .file-details {
        margin-top: 8px;
        font-size: 0.8rem;
    }
    
    .download-btn {
        margin-top: 12px;
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .download-stats {
        font-size: 0.8rem;
        margin-top: 6px;
    }
    
    /* Adjust spacing between cards and container edges */
    .container {
        padding: 16px 12px;
    }
}

/* File card styles */
.file-card {
    background-color: var(--card-background);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--accent-color-light);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: auto;
    width: 100%;
    margin-bottom: 0;
    position: relative;
}

.file-card.dynamic {
    height: auto;
    min-height: unset;
    width: 100%;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--accent-color-light), 
                0 10px 30px var(--accent-color-shadow);
}

.file-card:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.75rem;
    box-shadow: 0 0 15px var(--accent-color-light);
    opacity: 0;
    animation: cardGlow 1.5s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}

@keyframes cardGlow {
    from {
        opacity: 0;
        box-shadow: 0 0 5px var(--accent-color-light);
    }
    to {
        opacity: 1;
        box-shadow: 0 0 20px var(--accent-color-light);
    }
}

.file-card.clicked {
    transform: scale(0.95);
}

.file-card-header {
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.file-card-header.dynamic-height {
    height: auto;
    width: 100%;
    padding-top: 0; /* Entferne das feste Seitenverhältnis */
    background-size: contain;
    background-position: center;
}

.file-card-header.with-image {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    height: auto;
}

.file-card-header.with-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.file-card-header.with-image img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.file-icon {
    font-size: 3rem;
    color: var(--accent-color);
    opacity: 0.8;
    z-index: 10;
    transition: transform 0.3s;
    padding: 1.5rem 0;
}

.file-card:hover .file-icon {
    transform: scale(1.1);
}

.file-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 0;
}

.file-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* Erlaubt Zeilenumbrüche für lange Titel */
    word-break: break-word;
    font-family: var(--font-heading);
}

.file-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.5rem;
}

.file-description.dynamic {
    -webkit-line-clamp: initial;
    height: auto;
    max-height: none;
    white-space: pre-line;
    word-break: break-word;
    overflow: visible;
    margin-bottom: 0.75rem;
    min-height: 0;
}

.file-details {
    display: flex;
    justify-content: space-between;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.file-type {
    font-family: var(--font-accent);
    font-weight: 500;
    color: var(--accent-color);
}

.download-stats {
    display: flex;
    justify-content: center;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.download-stats i {
    color: var(--accent-color);
    margin-right: 0.35rem;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: transparent;
    border: 1px solid var(--accent-color-light);
    color: var(--foreground);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
    font-family: var(--font-accent);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent-color-light),
        transparent
    );
    transition: all 0.4s ease;
}

.download-btn:hover {
    background-color: var(--accent-color-light);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--accent-color-shadow);
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn i {
    margin-right: 0.5rem;
}

/* Bottom navbar */
.bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(30, 41, 59, 0.6); /* Transparenter Hintergrund */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    padding: 0.75rem 0;
    z-index: 1000;
    font-family: var(--font-accent);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 2rem;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color 0.3s;
}

.nav-item.active {
    color: var(--accent-color);
}

.nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Settings panel */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(100% - 70px); /* Lässt Platz für Navbar am unteren Rand */
    background-color: var(--background);
    padding: 2rem;
    z-index: 900;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    padding-bottom: 5rem;
}

.settings-panel.active {
    transform: translateX(0);
}

.settings-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
}

.settings-group {
    background-color: var(--card-background);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.settings-group h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--foreground);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    font-family: var(--font-heading);
}

/* Toggle switch */
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.toggle-container span {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--muted-foreground);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--accent-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Color picker */
.color-picker {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.color-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 3px solid transparent;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.color-option.active {
    border: 3px solid var(--foreground);
    box-shadow: 0 0 0 2px var(--accent-color);
}

/* File type specific gradient backgrounds */
.gradient-pdf {
    background: linear-gradient(to bottom right, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.3));
}

.gradient-image {
    background: linear-gradient(to bottom right, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.3));
}

.gradient-document {
    background: linear-gradient(to bottom right, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
}

.gradient-code {
    background: linear-gradient(to bottom right, rgba(147, 51, 234, 0.2), rgba(124, 58, 237, 0.3));
}

.gradient-archive {
    background: linear-gradient(to bottom right, rgba(139, 92, 246, 0.2), rgba(124, 58, 237, 0.3));
}

.gradient-default {
    background: linear-gradient(to bottom right, rgba(107, 114, 128, 0.2), rgba(75, 85, 99, 0.3));
}

.dark-mode .gradient-pdf {
    background: linear-gradient(to bottom right, rgba(30, 64, 175, 0.4), rgba(30, 58, 138, 0.5));
}

.dark-mode .gradient-image {
    background: linear-gradient(to bottom right, rgba(4, 120, 87, 0.4), rgba(6, 95, 70, 0.5));
}

.dark-mode .gradient-document {
    background: linear-gradient(to bottom right, rgba(180, 83, 9, 0.4), rgba(146, 64, 14, 0.5));
}

.dark-mode .gradient-code {
    background: linear-gradient(to bottom right, rgba(109, 40, 217, 0.4), rgba(91, 33, 182, 0.5));
}

.dark-mode .gradient-archive {
    background: linear-gradient(to bottom right, rgba(109, 40, 217, 0.4), rgba(91, 33, 182, 0.5));
}

.dark-mode .gradient-default {
    background: linear-gradient(to bottom right, rgba(75, 85, 99, 0.4), rgba(55, 65, 81, 0.5));
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin: 20px auto;
    max-width: 500px;
    border: 1px solid var(--border);
}

.empty-state .empty-icon {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--foreground);
    font-family: var(--font-heading);
}

.empty-state p {
    color: var(--muted-foreground);
    margin-bottom: 10px;
}

/* Admin control buttons */
.file-card-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 20;
}

.edit-file-btn, .delete-file-btn {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.2s;
    border: none;
    color: white;
}

.file-card:hover .edit-file-btn,
.file-card:hover .delete-file-btn {
    opacity: 1;
}

.edit-file-btn {
    background-color: rgba(16, 185, 129, 0.9);
}

.edit-file-btn:hover {
    transform: scale(1.1);
    background-color: rgb(16, 185, 129);
}

.delete-file-btn {
    background-color: rgba(239, 68, 68, 0.9);
}

.delete-file-btn:hover {
    transform: scale(1.1);
    background-color: rgb(239, 68, 68);
}

/* Edit modal styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.edit-modal {
    background-color: var(--card-background);
    border-radius: 0.75rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--hover-shadow);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--border);
}

.modal-overlay.active .edit-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    font-family: var(--font-heading);
}

.close-modal {
    background: none;
    border: none;
    color: var(--muted-foreground);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--foreground);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--foreground);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border);
    background-color: var(--card-background);
    color: var(--foreground);
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-color-light);
}

.file-preview {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 0.375rem;
    object-fit: contain;
}

.file-preview .file-info {
    flex: 1;
}

.file-preview .file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    text-align: left;
    font-size: 0.875rem;
}

.file-preview .file-size {
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-cancel {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-cancel:hover {
    background-color: var(--border);
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Spezifische Anpassungen für Karten mit Bildern */
.file-card:has(.file-card-header.with-image) {
    height: auto;
}

.file-card:has(.file-card-header:not(.with-image)) .file-icon {
    padding: 1rem 0;
}

/* Notification style */
.notification {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 400px;
    z-index: 2000;
    border-left: 4px solid var(--accent-color);
    animation: slideIn 0.3s forwards;
}

.notification.success {
    border-left-color: #10b981;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification-content {
    display: flex;
    align-items: center;
}

.notification-content i {
    margin-right: 12px;
    font-size: 20px;
}

.notification.success i {
    color: #10b981;
}

.notification.error i {
    color: #ef4444;
}

.close-notification {
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
}

.close-notification:hover {
    color: var(--foreground);
}

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

.back-button {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--foreground);
    cursor: pointer;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
    width: fit-content;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.back-button:hover {
    background-color: var(--accent-color-light);
    transform: translateY(-2px);
}

.back-button i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.sort-info {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 20px;
    background-color: var(--card-background);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sort-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

.sort-info i {
    color: var(--accent-color);
    margin-right: 6px;
}

.github-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: #24292e;
    border: 1px solid #444;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-accent);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.github-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.4s ease;
}

.github-btn:hover {
    background-color: #2f363d;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border-color: #666;
}

.github-btn:hover::before {
    left: 100%;
}

.github-btn i {
    margin-right: 0.5rem;
}

.image-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.image-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.image-popup-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    transform: scale(0.9) translateY(20px) perspective(1000px) rotateX(2deg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--card-background);
    perspective: 1000px;
    transform-style: preserve-3d;
}

.image-popup-overlay.active .image-popup-container {
    transform: scale(1) translateY(0) perspective(1000px) rotateX(0);
}

.image-popup-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-popup-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: floatAnimation 5s ease-in-out infinite;
    cursor: zoom-in;
    transform-origin: center center;
}

.image-popup-img.zoomed {
    cursor: zoom-out;
    animation: none;
    transform: scale(2) !important;
}

.close-image-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3100;
    transition: background-color 0.2s, transform 0.2s;
}

.close-image-popup:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.image-popup-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.image-popup-container:hover .image-popup-caption {
    opacity: 1;
    transform: translateY(0);
}

@keyframes floatAnimation {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Helper text for zoom functionality */
.image-popup-container::after {
    content: "Click image to zoom";
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* ensure it doesn't interfere with clicks */
}

.image-popup-container:hover::after {
    opacity: 0.8;
}

/* Futuristische Elemente Styling */
.futuristic-text {
    font-family: var(--font-special);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tech-glow {
    text-shadow: 0 0 5px var(--accent-color-light), 
                 0 0 10px var(--accent-color-light), 
                 0 0 15px var(--accent-color);
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    from {
        text-shadow: 0 0 5px var(--accent-color-light), 
                     0 0 10px var(--accent-color-light);
    }
    to {
        text-shadow: 0 0 5px var(--accent-color-light), 
                     0 0 10px var(--accent-color-light), 
                     0 0 15px var(--accent-color), 
                     0 0 20px var(--accent-color);
    }
}