/* === Globale Variablen & Stile === */
:root {
    --bg-color: #0f0f0f;
    --surface-color: #1a1a1a;
    --surface-light: #252525;
    --primary-color: #00d4ff;
    --primary-hover: #00a8cc;
    --text-color: #e0e0e0;
    --text-muted: #9e9e9e;
    --font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

/* === Typografie === */
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.5rem; }

/* === Scroll-Reveal Animation === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* === Navigation === */
header {
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-speed) ease;
}

nav .desktop-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 2.5rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color var(--transition-speed) ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all var(--transition-speed) ease;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
}

nav a:hover::after, nav a.active::after {
    width: 80%;
    left: 10%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
}

/* === Hauptinhalt === */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 2rem 2rem 2rem;
}

section {
    margin-bottom: 5rem;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-speed) ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--bg-color);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

/* === Hero-Bereich (index.html) === */
.hero {
    text-align: center;
    padding: 6rem 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-content .highlight {
    background: linear-gradient(90deg, var(--primary-color), #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === Über Mich (index.html & ueber-mich.html) === */
.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    flex-shrink: 0;
}

/* === Projekt Grid (projekte.html & index.html) === */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.project-card h3 {
    margin-bottom: 0.5rem;
}

.project-card p {
    color: var(--text-muted);
    flex-grow: 1;
}

.project-tags {
    margin: 1.5rem 0;
}

.tag {
    display: inline-block;
    background-color: var(--surface-light);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    font-weight: 500;
}

/* === Skills (index.html) === */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.skill-item {
    background-color: var(--surface-color);
    color: var(--text-color);
    padding: 0.8rem 1.8rem;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.skill-item:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    transform: scale(1.05);
}

/* === Download Tabelle (downloads.html) === */
.download-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.download-table th, .download-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.download-table th {
    background-color: var(--surface-light);
    font-weight: 600;
}

.download-table tr:last-child td {
    border-bottom: none;
}

.download-table tr:hover {
    background-color: rgba(0, 212, 255, 0.05);
}

/* === Kontakt Formular (kontakt.html) === */
.contact-form {
    display: grid;
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.social-links {
    text-align: center;
    margin-top: 2rem;
}

.social-links a {
    margin: 0 1rem;
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: color var(--transition-speed);
}

.social-links a:hover {
    color: var(--primary-color);
}

/* === Footer === */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    nav .desktop-nav {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--surface-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    nav .desktop-nav.active {
        left: 0;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 220px;
    }
}

/* === Footer === */
footer {
    margin-top: 5rem;
    padding: 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Erlaubt Umbruch auf kleinen Bildschirmen */
    gap: 1rem;
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Abstand zwischen den Icons/Links */
}

.footer-center {
    text-align: center;
}

.footer-center p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-left a, .footer-right a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.footer-left a:hover, .footer-right a:hover {
    color: var(--primary-color);
}

.footer-right svg {
    width: 24px;
    height: 24px;
    fill: currentColor; /* Wichtig: SVG übernimmt die Textfarbe */
    transition: transform var(--transition-speed) ease;
}

.footer-right a:hover svg {
    transform: translateY(-3px); /* Kleiner Hover-Effekt */
}

/* Responsive Anpassung für mobile Geräte */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-left, .footer-right {
        order: 2; /* Icons und Links nach unten */
    }

    .footer-center {
        order: 1; /* Copyright nach oben */
    }
}

/* === QR-Code Generator Seite === */
.qr-generator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

.qr-controls {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.control-group textarea,
.control-group input[type="range"],
.control-group input[type="color"],
.control-group select {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-family: var(--font-family);
}

.control-group textarea {
    min-height: 100px;
    resize: vertical;
}

.control-group input[type="color"] {
    height: 50px;
    padding: 5px;
    cursor: pointer;
}

.control-group small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.qr-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.qr-canvas-container {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: inline-block; /* Passt sich dem Inhalt an */
}

#qr-canvas {
    display: block; /* Verhindert leeren Raum unter dem Canvas */
}

/* Responsive Anpassung */
@media (max-width: 968px) {
    .qr-generator-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .control-row {
        grid-template-columns: 1fr;
    }
}

/* === Server Monitoring Seite === */
.monitoring-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.monitoring-header h1 {
    margin: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-muted);
}

.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.monitoring-box {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden; /* Sorgt dafür, dass die abgerundeten Ecken auch auf den Inhalt angewendet werden */
}

.monitoring-box.wide-box {
    grid-column: 1 / -1; /* Lässt die Box die gesamte Breite einnehmen */
}

.box-header {
    background-color: var(--surface-light);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.box-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.box-content {
    padding: 1.5rem;
}

.box-content table {
    width: 100%;
    border-collapse: collapse;
}

.box-content table td {
    padding: 0.5rem 0;
    color: var(--text-muted);
}

.box-content table td:first-child {
    font-weight: 500;
    color: var(--text-color);
    width: 40%; /* Feste Breite für die erste Spalte für bessere Ausrichtung */
}

.box-content thead th {
    text-align: left;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

/* Gauge / Progress Bar Stile */
.gauge-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem 0;
}

.gauge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.gauge {
    --value: 0%;
    --max: 100;
    --size: 120px;
    --thickness: 10px;
    --bg-color: var(--surface-light);
    --fg-color: var(--primary-color);

    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    position: relative;
    display: grid;
    place-items: center;
    background: conic-gradient(
        var(--fg-color) 0deg,
        var(--fg-color) calc(var(--value) * 3.6deg),
        var(--bg-color) calc(var(--value) * 3.6deg)
    );
}

.gauge::before {
    content: '';
    position: absolute;
    width: calc(var(--size) - var(--thickness) * 2);
    height: calc(var(--size) - var(--thickness) * 2);
    background-color: var(--surface-color);
    border-radius: 50%;
}

.gauge div {
    position: relative;
    z-index: 1;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.gauge span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.progress-bar-container {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    --value: 0%;
    height: 20px;
    background-color: var(--surface-light);
    border-radius: 10px;
    overflow: hidden;
    flex-grow: 1;
}

.progress-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: var(--value);
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.service.online {
    background-color: rgba(0, 255, 100, 0.1);
    color: #00ff64;
}
.service.online::before {
    background-color: #00ff64;
}

.service.offline {
    background-color: rgba(255, 0, 100, 0.1);
    color: #ff0064;
}
.service.offline::before {
    background-color: #ff0064;
}

/* Responsive Anpassung */
@media (max-width: 768px) {
    .monitoring-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .monitoring-grid {
        grid-template-columns: 1fr;
    }
    .gauge-container {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* === Kontaktformular Statusmeldungen === */
.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-status.success {
    background-color: rgba(74, 222, 128, 0.1); /* Grüner Hintergrund */
    color: #4ade80;
    border: 1px solid #4ade80;
}

.form-status.error {
    background-color: rgba(248, 113, 113, 0.1); /* Roter Hintergrund */
    color: #f87171;
    border: 1px solid #f87171;
}

/* Zeigt die Statusmeldung an, wenn sie Text enthält */
.form-status:not(:empty) {
    opacity: 1;
    transform: translateY(0);
}