/* Archive-spezifische Styles */

/* Active Navigation Link */
.nav-link.active {
    color: #60a5fa !important;
}

/* Hero Section Anpassungen für Archiv */
.archive-hero {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding-top: 140px;
    padding-bottom: 40px;
    min-height: 70vh; /* Reduzierte Höhe */
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, #1a1f35);
    z-index: 2;
    pointer-events: none;
}

/* Archive Navigation Tabs */
.archive-nav {
    background: linear-gradient(180deg, #1a1f35 0%, #1e2340 100%);
    padding: 2rem 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.15);
    position: relative;
    z-index: 10;
    margin-top: -20px; /* Überlappung mit Hero vermeiden */
}

.archive-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: 2px solid rgba(96, 165, 250, 0.3);
    color: #a1a1aa;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    border-color: #60a5fa;
    color: #e4e6ea;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    border-color: #60a5fa;
    color: #0f0f23;
    box-shadow: 0 5px 15px rgba(96, 165, 250, 0.3);
}

/* Archive Sections */
.archive-section {
    padding: 60px 0;
    display: none;
    position: relative;
    z-index: 5;
    background: linear-gradient(180deg, #0f0f23 0%, #18181b 100%);
}

.archive-section.active {
    display: block;
}

/* Archive Grid für Maps */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.archive-card {
    background: linear-gradient(145deg, #1e2340 0%, #252b47 100%);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
    opacity: 1;
    transform: translateY(0);
}

.archive-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.3);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.archive-card:hover .card-image img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
}

.download-info span {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    backdrop-filter: blur(5px);
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    color: #f4f4f5;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: #a1a1aa;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.card-meta span {
    font-size: 0.9rem;
    color: #71717a;
    background: rgba(96, 165, 250, 0.1);
    padding: 4px 8px;
    border-radius: 8px;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.card-actions .btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
}

.download-icon {
    margin-right: 5px;
}

/* Timeline für Website-Archiv */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #60a5fa, #3b82f6);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-date {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: #0f0f23;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    margin: 0 2rem;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(96, 165, 250, 0.3);
}

.timeline-content {
    background: linear-gradient(145deg, #1e2340 0%, #252b47 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(96, 165, 250, 0.15);
    flex: 1;
    max-width: 300px;
}

.timeline-content h3 {
    color: #f4f4f5;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: #a1a1aa;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Screenshot Gallery */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.screenshot-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.screenshot-item:hover {
    transform: scale(1.02);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.screenshot-item:hover .screenshot-overlay {
    transform: translateY(0);
}

.screenshot-overlay h4 {
    margin-bottom: 0.3rem;
}

.screenshot-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 50px;
    }
    
    .timeline-date {
        margin: 0 0 1rem 0;
        align-self: flex-start;
    }
    
    .timeline-content {
        max-width: 100%;
        margin: 0;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .screenshot-gallery {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation für Downloads */
.btn.downloading {
    position: relative;
    pointer-events: none;
}

.btn.downloading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Code Archive Styles */
.code-categories {
    margin-bottom: 2rem;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.category-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #a1a1aa;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-btn:hover {
    border-color: #60a5fa;
    color: #e4e6ea;
}

.category-btn.active {
    background: rgba(96, 165, 250, 0.2);
    border-color: #60a5fa;
    color: #60a5fa;
}

.code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.code-card {
    background: linear-gradient(145deg, #1e2340 0%, #252b47 100%);
    border-radius: 15px;
    border: 1px solid rgba(96, 165, 250, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.code-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.3);
}

.code-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}

.file-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    padding: 8px;
    border-radius: 8px;
    background: rgba(96, 165, 250, 0.1);
}

.html-icon { background: rgba(255, 107, 53, 0.2); }
.css-icon { background: rgba(41, 184, 229, 0.2); }
.js-icon { background: rgba(247, 223, 30, 0.2); }
.java-icon { background: rgba(237, 117, 36, 0.2); }

.file-info {
    flex: 1;
}

.file-info h3 {
    color: #f4f4f5;
    margin: 0;
    font-size: 1.1rem;
}

.file-type {
    color: #a1a1aa;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-actions {
    display: flex;
    gap: 0.5rem;
}

.preview-code-btn {
    background: none;
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #a1a1aa;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-code-btn:hover {
    border-color: #60a5fa;
    color: #60a5fa;
}

.code-preview {
    background: #0a0a12;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    max-height: 120px;
    overflow-y: auto;
}

.code-preview pre {
    margin: 0;
    color: #e4e6ea;
    font-size: 0.85rem;
    line-height: 1.5;
}

.code-preview code {
    color: #e4e6ea;
}

.code-meta {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}

.code-meta span {
    font-size: 0.8rem;
    color: #71717a;
}

.code-description {
    padding: 1rem;
}

.code-description p {
    color: #a1a1aa;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tech-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.card-actions {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
}

.live-preview-btn {
    background: transparent;
    border: 2px solid rgba(96, 165, 250, 0.3);
    color: #a1a1aa;
}

.live-preview-btn:hover {
    border-color: #60a5fa;
    color: #60a5fa;
}

/* Code Preview Modal */
.code-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    backdrop-filter: blur(5px);
    opacity: 1;
}

.code-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-modal-content {
    background: linear-gradient(145deg, #1e2340 0%, #252b47 100%);
    border-radius: 15px;
    max-width: 90vw;
    max-height: 90vh;
    border: 1px solid rgba(96, 165, 250, 0.3);
    overflow: hidden;
}

.code-modal-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-modal-title {
    color: #f4f4f5;
    margin: 0;
}

.code-modal-close {
    background: none;
    border: none;
    color: #a1a1aa;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.code-modal-close:hover {
    color: #60a5fa;
}

.code-modal-body {
    padding: 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

.code-modal-body pre {
    background: #0a0a12;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    color: #e4e6ea;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

/* Responsive Design für Code-Sektion */
@media (max-width: 768px) {
    .code-grid {
        grid-template-columns: 1fr;
    }
    
    .category-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .code-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .code-actions {
        align-self: flex-end;
    }
    
    .code-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .card-actions {
        flex-direction: column;
    }
}
