/* CSS Custom Properties für Theme-Wechsel */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --hero-overlay: linear-gradient(135deg, rgba(30, 58, 138, 0.8) 0%, rgba(59, 130, 246, 0.7) 50%, rgba(96, 165, 250, 0.6) 100%);
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --hero-overlay: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(59, 130, 246, 0.8) 50%, rgba(96, 165, 250, 0.7) 100%);
}

/* Global Dark Mode Styles */
body.dark-mode {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
}

/* Background Image Optimizations */
.hero {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll; /* Bessere Performance auf Mobile */
    }
}

/* Logo Animations */
.logo-image {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.navbar:hover .logo-image {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Creative Skills Hover Effects */
.skill-card:hover .fa-php {
    color: #0b51bb;
    transform: scale(1.1);
}

.skill-card:hover .fa-js-square {
    color: #f7df1e;
    transform: scale(1.1);
}

.skill-card:hover .fa-gamepad {
    color: #239120;
    transform: scale(1.1);
}

.skill-card:hover .fa-shield-alt {
    color: #dc2626;
    transform: scale(1.1);
}

.skill-card:hover .fa-palette {
    color: #8b5cf6;
    transform: scale(1.1);
}

.skill-card:hover .fa-database {
    color: #0ea5e9;
    transform: scale(1.1);
}

.skill-card:hover .fa-image {
    color: #e11d48;
    transform: scale(1.1);
}

.skill-card:hover .fa-video {
    color: #7c3aed;
    transform: scale(1.1);
}

.skill-card:hover .fa-cube {
    color: #f59e0b;
    transform: scale(1.1);
}

.skill-card:hover .fa-music {
    color: #10b981;
    transform: scale(1.1);
}

.skill-icon {
    transition: all 0.3s ease;
}

/* Dark Mode Component Styles */
.dark-mode .navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
}

.dark-mode .hero {
    background: 
        var(--hero-overlay),
        url('../assets/images/background.jpg') center/cover no-repeat;
}

.dark-mode .skill-card,
.dark-mode .project-card,
.dark-mode .contact-item {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
    box-shadow: 0 10px 30px var(--shadow-light);
}

.dark-mode .skill-card:hover,
.dark-mode .project-card:hover,
.dark-mode .contact-item:hover {
    box-shadow: 0 20px 40px var(--shadow-medium);
}

.dark-mode .skill-description,
.dark-mode .project-description,
.dark-mode .contact-info {
    color: var(--text-secondary);
}

.dark-mode .about-text {
    color: var(--text-secondary);
}

.dark-mode .about-text h3,
.dark-mode .skill-title,
.dark-mode .project-title,
.dark-mode .contact-title {
    color: var(--text-primary);
}

.dark-mode .additional-projects {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-color: var(--border-color);
}

.dark-mode .additional-content h3 {
    color: #60a5fa;
}

.dark-mode .additional-content p {
    color: var(--text-secondary);
}

.dark-mode .stat-number {
    color: #60a5fa;
}

.dark-mode .stat-label {
    color: var(--text-muted);
}

.dark-mode .footer {
    background: var(--bg-secondary);
}

.dark-mode .tech-tag {
    background: rgba(96, 165, 250, 0.1);
    color: #93c5fd;
}

.dark-mode .modal-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.dark-mode .close {
    color: var(--text-muted);
}

.dark-mode .close:hover {
    color: #60a5fa;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    color: white;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
}

.dark-mode .theme-toggle {
    background: linear-gradient(45deg, #1e40af, #3b82f6);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
}

.dark-mode .theme-toggle:hover {
    box-shadow: 0 12px 35px rgba(30, 64, 175, 0.5);
}

/* Smooth Transitions für Theme-Wechsel */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Animation für Theme-Wechsel */
@keyframes themeTransition {
    0% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        opacity: 1;
    }
}

.theme-switching {
    animation: themeTransition 0.5s ease;
}

/* Mobile Navigation Menu */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(30, 58, 138, 0.98);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
    transform: rotate(90deg);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bars für Skills */
.skill-progress {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    border-radius: 3px;
    width: 0%;
    transition: width 2s ease;
}

/* Tooltip Komponente */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #1e3a8a;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1e3a8a transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Modal Komponente */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #64748b;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #1e3a8a;
}

/* Badge Komponente */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-primary {
    background: #eff6ff;
    color: #1e40af;
}

.badge-success {
    background: #f0fdf4;
    color: #166534;
}

.badge-warning {
    background: #fffbeb;
    color: #92400e;
}

.badge-fire {
    background: linear-gradient(45deg, #dc2626, #ef4444);
    color: white;
}

/* Button Varianten */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #1e3a8a;
}

.btn-secondary:hover {
    background: #cbd5e1;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid #3b82f6;
    color: #3b82f6;
}

.btn-outline:hover {
    background: #3b82f6;
    color: white;
}

/* Card Hover Effects */
.card-3d {
    perspective: 1000px;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #1e40af, #3b82f6);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fire Effect für Feuerwehr-Bezug */
.fire-effect {
    position: relative;
    overflow: hidden;
}

.fire-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(239, 68, 68, 0.2), 
        rgba(220, 38, 38, 0.3), 
        transparent
    );
    animation: fireMove 2s infinite;
}

@keyframes fireMove {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Status Indicators */
.status-online {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
}

.status-online::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dark-mode-auto {
        background: #0f172a;
        color: #e2e8f0;
    }
    
    .dark-mode-auto .skill-card,
    .dark-mode-auto .project-card,
    .dark-mode-auto .contact-item {
        background: #1e293b;
        border-color: #334155;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .mobile-menu,
    .cta-button {
        display: none;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .section {
        padding: 1rem 0;
        break-inside: avoid;
    }
}
