html {
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}

:root {
    --bg-color: #f9f9f9;
    --primary-color: #006fc1;
    --text-color: #222;
    --border-color: #ccc;
    --font-size: 15px;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 2rem;
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

#controls {
    text-align: center;
    margin-bottom: 1rem;
}

#progress {
    font-size: 0.9rem;
    font-family: monospace;
    color: #444;
    margin-right: 10px;
}

#counter {
    font-size: 0.9rem;
    font-family: monospace;
    color: #444;
    margin-right: 10px;
}

#stopButton {
    font-size: 0.9rem;
    background-color: #ff5a5f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#results {
    width: 100%;
    margin: 0 auto;
}

.header,
.result {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    padding: 2px 4px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    line-height: 1.2;
}

.result.new {
    background-color: #d4edda;
    animation: fadeOutBg 3s ease-out forwards;
    position: relative;
    z-index: 0;
    transition: background-color 1.5s ease-out;
}

@keyframes fadeOutBg {
    0% {
        background-color: #d4edda;
        opacity: 1;
    }
    100% {
        background-color: transparent;
        opacity: 1;
    }
}

.header {
    font-weight: bold;
    background-color: #eef2f6;
    color: var(--primary-color);
    border-top: 1px solid var(--border-color);
}

.result:nth-child(even) {
    background-color: #fcfcfc;
}

.result:nth-child(odd) {
    background-color: #f3f6f8;
}

#scrollTopBtn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background-color: #005b99;
    color: white;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#scrollTopBtn:hover {
    background-color: #0077cc;
    transform: translateY(-2px);
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#timer {
    font-size: 0.9rem;
    font-family: monospace;
    color: #444;
}

#search {
    display: block;
    margin: 0 auto 1.5rem auto;
    width: 100%;
    max-width: 600px;
    padding: 10px 14px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

#logIdInput {
    display: block;
    margin: 0 auto 1.5rem auto;
    width: 100%;
    max-width: 600px;
    padding: 10px 14px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.tooltip-wrapper {
    display: block;      /* Block-Element, nimmt 100% Breite */
    width: 100%;         /* Optional, sicherheitshalber */
    cursor: help;
    margin-bottom: 1.5rem;
    text-align: center;  /* sorgt dafür, dass der Text im h1 zentriert wird */
    outline: none;
}

/* Überschrift bleibt normal block mit 100% Breite */
.tooltip-wrapper h1 {
    color: #006FC1FF;/*var(--primary-color);*/
    margin: 0; /* Margin ggf. im Wrapper steuern */
    font-size: 2rem; /* oder was du willst */
}

/* Tooltip bleibt unverändert */
.tooltip-text {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #222;
    color: white;
    padding: 8px 10px;
    border-radius: 4px;
    max-width: 260px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    white-space: normal;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 100;
    pointer-events: none;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #222 transparent;
}

.tooltip-wrapper:hover .tooltip-text,
.tooltip-wrapper:focus .tooltip-text {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.container-wrapper {
    position: absolute; /* wichtig */
    top: -5px;           /* Abstand vom oberen Rand der Header-Container */
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    text-align: center;
    outline: none;


    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.container-box {
    position: relative;
    width: 292px;
    height: 140px;
    background: linear-gradient(to bottom, #2c3e50 0%, #34495e 100%);
    border: 4px solid #1c2833;
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.4);
    overflow: hidden;
}

.liquid {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 50%; /* default = 45l */
    background: linear-gradient(to top, #00bfff, #33ccff);
    overflow: hidden;
    transition: height 0.5s ease;
    z-index: 1;
}

.wave {
    position: absolute;
    width: 200%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 45%;
    animation: waveMove 6s linear infinite;
}

.wave1 {
    bottom: 0;
    left: -50%;
    animation-delay: 0s;
}

.wave2 {
    bottom: 6px;
    left: -50%;
    opacity: 0.3;
    animation-delay: 3s;
}

@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.fill-label-inside {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: monospace;
    font-size: 1.3rem;
    background: rgba(255,255,255,0.8);
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 3;
    color: #1c243b;
}

/* Decorative container ridges */
.container-ridges {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-evenly;
    z-index: 0;
}

.ridge {
    width: 4px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
}

.header-container {
    position: relative;
    height: 150px;
    width: 100%;
    margin-top: 1rem;
}

.slogan{
    position: relative;
    top: -5px;           /* Abstand vom oberen Rand der Header-Container */
    color: #D7D7D8FF;
    font-family: monospace;"
}

.top-nav {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 1rem;
    font-family: monospace;
    font-size: 0.95rem;
}

.top-nav a {
    color: #333;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s ease-in-out;
}

.top-nav a:hover {
    background: #e0e0e0;
}

