/* ===== GLOBAL STYLES ===== */
/* Diese CSS wird in ALLE Seiten geladen - gemeinsame Styles */
/* Mobile-First Responsive Design */

:root {
    --header-height: 80px;
}

body { 
    background-color: #313244;
    font-family: Arial; 
    text-align: center; 
    margin-top: 0;
    padding: 15px;
    /* Raum für den fixierten Header, verhindert Überlappung */
    padding-top: calc(var(--header-height) + 12px);
    box-sizing: border-box;
}

/* ===== HEADER NAVIGATION ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 8px 5px;
    background-color: #1e1e2e;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    /* feste Höhe via Variable, wird in Media-Queries bei Bedarf überschrieben */
    height: var(--header-height);
    gap: 5px;
}

/* Navigation Links */
.nav {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 0px 5px 8px 5px;
    box-sizing: border-box;
    align-items: center;
    min-height: 44px;
}

/* Container for main links and auth items */
.nav-main-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-auth-container {
    margin-left: auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-link {
    color: #cdd6f4;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 4px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.nav-link:hover {
    color: #89b4fa;
    background-color: rgba(137, 180, 250, 0.1);
}

/* ===== BUTTONS ===== */
button { 
    padding: 12px 20px; 
    font-size: 14px;
    margin: 8px; 
    cursor: pointer; 
    background-color: #585b70;
    color: #cdd6f4;
    border-radius: 4px;
    border: none;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #89b4fa;
}

/* ===== CENTERING FOR CHAT/UPDATES ===== */
.chat-container, .support-container, .container { 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: flex-start;
    margin-top: 0; /* rely on body padding-top for spacing under header */
}

.chat-window, .support-window {
    max-width: 820px;
    width: 100%;
}

.chat-form, .support-form, .controls {
    max-width: 820px;
    width: 100%;
}

/* ===== TYPOGRAPHY ===== */
h1 { 
    color: #cdd6f4;
    font-size: 24px;
    line-height: 1.2;
    margin: 10px 0;
}

h2 { 
    color: #cdd6f4;
    font-size: 20px;
    margin: 10px 0;
}

h3 {
    color: #cdd6f4;
    font-size: 18px;
    margin: 8px 0;
}

p { 
    color: #cdd6f4; 
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0;
}

/* ===== LOGO ===== */
.logo {
    width: 40px;
    height: auto;
    margin: 0;
    flex-shrink: 0;
    order: -1;
}

/* ===== MAIN TITLE ===== */
.titel1 {
    padding: 20px 10px 15px 10px;
}

/* ===== TABLET RESPONSIVE (480px+) ===== */
@media (min-width: 480px) {
    body {
        margin-top: 0;
        padding: 20px;
        /* header slightly smaller on small screens */
        padding-top: calc(var(--header-height) + 12px);
    }
    
    :root { --header-height: 72px; }
    .header {
        flex-direction: row;
        justify-content: center;
        padding: 10px 15px;
        gap: 15px;
        height: 72px;
    }
    
    .logo {
        width: 50px;
    }
    
    .nav {
        gap: 12px;
        padding: 0px 45px 8px 45px;
    }
    
    .nav-link {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    h1 { font-size: 28px; }
    h2 { font-size: 22px; }
    p { font-size: 17px; }
    
    button {
        padding: 12px 25px;
        font-size: 15px;
    }
}

/* ===== DESKTOP RESPONSIVE (768px+) ===== */
@media (min-width: 768px) {
    body {
        margin-top: 0;
        padding-top: calc(var(--header-height) + 12px);
        padding-left: 30px;
        padding-right: 30px;
        padding-bottom: 30px;
    }
    
    :root { --header-height: 80px; }
    .header {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 12px 20px;
        height: var(--header-height);
    }
    
    .logo {
        width: 80px;
        margin-right: 30px;
        order: 0;
    }
    
    .nav {
        gap: 0;
        padding: 0;
        flex-wrap: nowrap !important;
    }
    
    /* Show main links on desktop */
    .nav-main-links { 
        display: flex !important; 
        flex-direction: row;
        position: static;
        background: transparent;
        border: none;
        padding: 0;
        gap: 25px;
        align-items: center;
        z-index: auto;
        width: auto;
        max-height: none;
        overflow: visible;
    }
    
    .nav-link {
        font-size: 15px;
        padding: 8px 12px;
        line-height: 1.4;
        display: inline;
        white-space: nowrap;
    }
    
    .nav-link:hover {
        transform: scale(1.05);
    }
    
    .nav-burger { display: none !important; }
    
    /* Center chat/updates containers on desktop */
    .chat-container, .support-container, .container {
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        margin: 0 auto;
    }
    
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
    p { font-size: 18px; }
    
    button {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .titel1 {
        padding: 30px 20px 25px 0;
    }
}

/* ===== MOBILE RESPONSIVE (max-width: 767px) ===== */
@media (max-width: 767px) {
    body {
        margin-top: 0;
        padding: 12px;
        padding-top: calc(var(--header-height) + 12px);
    }
    
    :root { --header-height: 56px; }
    .header {
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 12px;
        height: var(--header-height);
    }
    
    .logo {
        order: -1;
        flex-shrink: 0;
        width: 40px;
    }
    
    .nav {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-end;
        align-items: center;
        width: auto;
        gap: 0;
        padding: 0;
    }
    
    /* Show only burger on mobile */
    .nav-burger { 
        display: none !important; 
    }
    
    /* Show main links on mobile */
    .nav-main-links { 
        display: flex !important;
        flex-direction: row;
        gap: 8px;
        padding: 0;
        align-items: center;
        z-index: auto;
        width: auto;
        max-height: none;
        overflow: visible;
        position: static;
        top: auto;
        left: auto;
        right: auto;
        background: transparent;
        border: none;
    }
    
    /* Show when menu is open */
    .nav[data-open="1"] .nav-main-links { 
        display: flex !important; 
    }
    
    .nav-link {
        font-size: 13px;
        padding: 8px 12px;
        line-height: 1.4;
        white-space: normal;
        display: block;
    }
    
    .chat-container, .support-container, .container {
        padding: 0;
    }
}

/* ===== LARGE DESKTOP (1200px+) ===== */
@media (min-width: 1200px) {
    body {
        margin-top: 0;
        padding: 40px;
        padding-top: 85px;
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .header {
        padding: 15px 40px;
        height: 80px;
    }
    
    .logo {
        width: 100px;
        margin-right: 40px;
    }
    
    .nav {
        gap: 30px;
    }
    
    .nav-link {
        font-size: 16px;
        padding: 10px 15px;
    }
    
    h1 { font-size: 36px; }
    h2 { font-size: 28px; }
    p { font-size: 18px; }
}
