:root {
    --primary-color: #175679;
    --accent-color: #ff7a00;
    --secondary-color: #3b7798;
    --bg-accent-color: #a0bec8;
    --bg-color: #ffffff;
    --text-color: #444444;
    --light-text: #ffffff;
    --border-radius: 12px;
    --box-shadow: 0 10px 20px rgba(23, 86, 121, 0.1);
    --transition: all 0.3s ease;

    /* Dunkelmodus-Variablen */
    --dark-bg-color: #1a1a1a;
    --dark-card-bg: #2d2d2d;
    --dark-text-color: #e0e0e0;
    --dark-secondary-color: #8fb5c9;
}

/* Grundlegende Stile */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Container und Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Überschriften */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

h4 {
    font-size: 1.25rem;
    color: var(--secondary-color);
}

h5 {
    font-size: 1.1rem;
    color: var(--secondary-color);
}

h6 {
    font-size: 1rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Absätze */
p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Listen */
ul, ol {
    margin: 0 0 1.5rem 1.25rem;
    padding-left: 1rem;
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

li {
    margin-bottom: 0.5rem;
}

ul ul, ol ol, ul ol, ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Definition Lists */
dl {
    margin-bottom: 1.5rem;
}

dt {
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

dd {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Horizontale Linie */
hr {
    border: 0;
    height: 1px;
    background-color: var(--bg-accent-color);
    margin: 2rem 0;
}

/* Links */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Blockquote */
blockquote {
    border-left: 4px solid var(--accent-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: rgba(160, 190, 200, 0.1);
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Code */
code, pre {
    font-family: 'Courier New', Courier, monospace;
    background-color: rgba(160, 190, 200, 0.15);
    border-radius: 3px;
}

code {
    padding: 0.2rem 0.4rem;
    font-size: 0.9em;
}

pre {
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

pre code {
    padding: 0;
    background-color: transparent;
}

/* Tabellen */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--bg-accent-color);
}

th {
    background-color: rgba(160, 190, 200, 0.1);
    font-weight: bold;
    color: var(--primary-color);
}

tr:hover {
    background-color: rgba(160, 190, 200, 0.05);
}

/* Formularelemente */
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid var(--bg-accent-color);
    border-radius: 5px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.2);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

button, .btn {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    font-family: inherit;
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

button:hover, .btn:hover {
    background-color: #124a68;
    text-decoration: none;
}

button:disabled {
    background-color: var(--bg-accent-color);
    cursor: not-allowed;
}

/* Bilder */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

figure {
    margin: 1.5rem 0;
}

figcaption {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-align: center;
    margin-top: 0.5rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease;
}

.tagline {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--secondary-color);
    border-top: 1px solid var(--bg-accent-color);
    margin-top: 2rem;
}

/* Footer mit Links */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.footer-links a:hover::after {
    width: 100%;
}

/* IP-Karten */
.ip-display {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.ip-card {
    flex: 1;
    min-width: 300px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--bg-accent-color);
}

.ip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(23, 86, 121, 0.15);
}

.ip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
}

.ipv4::before {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.ipv6::before {
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.ip-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 1.5rem 0;
    word-break: break-all;
    color: var(--primary-color);
}

.copy-btn {
    background-color: var(--accent-color);
    color: var(--light-text);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background-color: #e66e00;
    transform: scale(1.05);
}

/* Info-Karten und Tools */
.additional-info, .tools {
    margin-bottom: 3rem;
}

.info-grid, .tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-card, .tool-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--bg-accent-color);
}

.info-card:hover, .tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(23, 86, 121, 0.15);
}

/* Datenschutzhinweis - dezentes Design */
.privacy-notice {
    background-color: rgba(160, 190, 200, 0.1);
    border: 1px solid rgba(160, 190, 200, 0.3);
    border-radius: var(--border-radius);
    /*padding: 0.8rem 1.2rem;*/
    padding: 0.4rem 1rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--secondary-color);
    position: relative;
    transition: var(--transition);
}

.privacy-notice:hover {
    background-color: rgba(160, 190, 200, 0.15);
}

.privacy-notice p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.privacy-notice strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Icon für den Datenschutzhinweis */
.privacy-icon {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Ergebnisanzeige für Tools */
.result-container {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 5px;
    font-size: 0.9rem;
    border: 1px solid var(--bg-accent-color);
}

.result-container ul {
    list-style-type: none;
    padding-left: 0;
    margin-left: 0;
}

.result-container li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.result-container li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(160, 190, 200, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Badges und Tags */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.badge-accent {
    background-color: var(--accent-color);
    color: var(--light-text);
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: var(--light-text);
}

/* Karten */
.card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
    border: 1px solid var(--bg-accent-color);
}

.card-header {
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--bg-accent-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-footer {
    margin: 1.5rem -1.5rem -1.5rem -1.5rem;
    padding: 1.5rem;
    border-top: 1px solid var(--bg-accent-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    background-color: rgba(160, 190, 200, 0.05);
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    border-left: 4px solid;
}

.alert-info {
    background-color: rgba(23, 86, 121, 0.1);
    border-left-color: var(--primary-color);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-left-color: #28a745;
}

.alert-warning {
    background-color: rgba(255, 122, 0, 0.1);
    border-left-color: var(--accent-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
}

/* 404 und Fehlerseiten */
.error-container {
    text-align: center;
    padding: 3rem 0;
}

.error-container p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.error-code {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* Fortschrittsanzeige */
.progress {
    width: 100%;
    height: 8px;
    background-color: rgba(160, 190, 200, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    width: 0;
    transition: width 0.5s ease;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Status-Farben */
.success {
    color: #28a745;
}

.error {
    color: #dc3545;
}

.warning {
    color: var(--accent-color);
}

.info {
    color: var(--primary-color);
}

/* Animationen */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ip-card, .info-card, .tool-card {
    animation: fadeIn 0.6s ease backwards;
}

.ip-card:nth-child(1) { animation-delay: 0.2s; }
.ip-card:nth-child(2) { animation-delay: 0.4s; }

.info-card:nth-child(1) { animation-delay: 0.6s; }
.info-card:nth-child(2) { animation-delay: 0.7s; }
.info-card:nth-child(3) { animation-delay: 0.8s; }
.info-card:nth-child(4) { animation-delay: 0.9s; }

/* Dunkelmodus */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--dark-bg-color);
        color: var(--dark-text-color);
    }

    h1, h2, h3, h4, h5, h6 {
        color: var(--dark-secondary-color);
    }

    .ip-card, .info-card, .tool-card, .card {
        background-color: var(--dark-card-bg);
        border-color: #444;
    }

    .ip-value {
        color: var(--dark-secondary-color);
    }

    input, textarea, select {
        background-color: #333;
        color: var(--dark-text-color);
        border-color: #555;
    }

    .result-container {
        background-color: #333;
        color: var(--dark-text-color);
    }

    .privacy-notice {
        background-color: rgba(23, 86, 121, 0.2);
        border-color: rgba(23, 86, 121, 0.4);
        color: var(--dark-secondary-color);
    }

    hr {
        background-color: #444;
    }

    blockquote {
        background-color: rgba(23, 86, 121, 0.2);
    }

    code, pre {
        background-color: rgba(23, 86, 121, 0.3);
    }

    th, td {
        border-bottom-color: #444;
    }

    th {
        background-color: rgba(23, 86, 121, 0.2);
    }

    tr:hover {
        background-color: rgba(23, 86, 121, 0.1);
    }

    .card-header, .card-footer {
        border-color: #444;
    }

    .card-footer {
        background-color: rgba(23, 86, 121, 0.1);
    }

    a {
        color: var(--accent-color);
    }

    a:hover {
        color: #ff9a40;
    }
}

/* Manueller Dunkelmodus */
body.dark-theme {
    background-color: var(--dark-bg-color);
    color: var(--dark-text-color);
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
    color: var(--dark-secondary-color);
}

body.dark-theme .ip-card,
body.dark-theme .info-card,
body.dark-theme .tool-card,
body.dark-theme .card {
    background-color: var(--dark-card-bg);
    border-color: #444;
}

body.dark-theme .ip-value {
    color: var(--dark-secondary-color);
}

body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
    background-color: #333;
    color: var(--dark-text-color);
    border-color: #555;
}

body.dark-theme .result-container {
    background-color: #333;
    color: var(--dark-text-color);
}

body.dark-theme hr {
    background-color: #444;
}

body.dark-theme blockquote {
    background-color: rgba(23, 86, 121, 0.2);
}

body.dark-theme code,
body.dark-theme pre {
    background-color: rgba(23, 86, 121, 0.3);
}

body.dark-theme th,
body.dark-theme td {
    border-bottom-color: #444;
}

body.dark-theme th {
    background-color: rgba(23, 86, 121, 0.2);
}

body.dark-theme tr:hover {
    background-color: rgba(23, 86, 121, 0.1);
}

/* Theme-Switch */
.theme-switch-wrapper {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 48px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: white;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.theme-label {
    margin-left: 10px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Barrierefreiheit */
:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Druckstile */
@media print {
    body {
        background-color: white;
        color: black;
        font-size: 12pt;
    }

    .container {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .ip-card, .info-card, .tool-card, .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .no-print {
        display: none !important;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    img {
        page-break-inside: avoid;
        max-width: 100% !important;
    }

    pre, blockquote {
        page-break-inside: avoid;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.35rem;
    }

    .ip-card {
        min-width: 100%;
    }

    .privacy-notice {
        font-size: 0.8rem;
        padding: 0.7rem 1rem;
    }

    .theme-switch-wrapper {
        position: relative;
        top: 0;
        right: 0;
        justify-content: center;
        margin-bottom: 1rem;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    h1 {
        font-size: 2.2rem;
    }

    .info-grid, .tools-grid {
        grid-template-columns: 1fr;
    }
}


body.info * {
    color: var(--secondary-color);
}

body.dark-theme .info * {
    color: var(--dark-secondary-color) !important;
}