:root {
    /* Dynamische Hintergründe und Farben werden in index.php befüllt */
    /* --career-bg-style, --private-bg-style, --career-primary, etc. */
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden { display: none !important; }

/* Header & Switch */
.main-header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.5s ease;
    backdrop-filter: blur(10px);
}

/* Scroll Offset für Sticky Header */
.rec-category-section, 
.rec-navigation {
    scroll-margin-top: 130px;
}

.main-header .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    min-height: 70px; /* Sicherstellen, dass der Container genug Höhe für das Logo hat */
}

.logo-area {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.logo { height: 50px; }

/* Responsive Header Fix */
@media (max-width: 767px) {
    .main-header .container {
        justify-content: space-between;
    }
    .logo-area {
        position: static;
        transform: none;
        margin-right: auto;
    }
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
    margin: 0 10px;
}

.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: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
}

input:checked + .slider { background-color: var(--private-primary); }
input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Sections */
.section { padding: 10px 20px 60px 20px; }

@media (min-width: 768px) {
    .section { padding: 10px 60px 60px 60px; }
}

/* Utlities */
.mb-5 { margin-bottom: 3rem; }
.text-center { text-align: center; }

/* Modal Basis */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 60px;
    border-radius: 30px;
    position: relative;
    box-sizing: border-box;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    cursor: pointer;
    color: #333;
}

/* Footer */
.main-footer {
    padding: 30px 0;
    font-size: 0.9rem;
    color: #666;
    margin-top: 20px;
}

.contact-section {
    position: relative;
    z-index: 1;
}

.contact-form-compact {
    margin: 0 auto;
    transition: all 0.3s ease;
    background: #ffffff !important;
    border-radius: 30px !important;
    padding: 4rem !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05) !important;
}

@media (max-width: 767px) {
    .contact-form-compact {
        padding: 2rem !important;
        border-radius: 20px !important;
    }
}

.contact-form-compact .form-control {
    width: 100%;
    display: block;
    font-family: inherit;
    font-size: 1.1rem;
    color: #333;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid #eee !important;
    background-color: transparent !important;
    transition: all 0.3s ease;
    padding: 1rem 0 !important;
}

.contact-form-compact .form-control::placeholder {
    color: #bbb;
    font-weight: 300;
}

.contact-form-compact .form-control:focus {
    box-shadow: none !important;
    background-color: transparent !important;
    border-bottom-color: var(--career-primary) !important;
    outline: none;
}

[data-theme="private"] .contact-form-compact .form-control:focus {
    border-bottom-color: var(--private-primary) !important;
}

.contact-submit-btn {
    border: none;
    padding: 12px 36px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
    margin-top: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-icon {
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
}

.theme-career .social-icon:hover {
    color: white;
    background: var(--career-primary);
    transform: translateY(-3px);
}

.theme-private .social-icon:hover {
    color: white;
    background: var(--private-primary);
    transform: translateY(-3px);
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #000;
}

.footer-links .separator {
    margin: 0 10px;
    opacity: 0.3;
}

/* Legal Modal */
.legal-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.legal-modal.active {
    display: block;
}

body.modal-open {
    overflow: hidden;
}

.legal-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    border: none;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    color: #333;
}

.legal-modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.legal-modal-content p {
    line-height: 1.6;
}

/* Scroll to Top Button Basis */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 300; /* Höher als Header (100) und Subpages (50) */
    border: none;
    outline: none;
    cursor: pointer;
    padding: 15px;
    transition: all 0.3s ease;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

#scroll-to-top.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#scroll-to-top .arrow-up {
    font-size: 20px;
    font-weight: bold;
}

/* Games Subpage Background & Theme - MOVED TO private.css to match other sections */

/* Game Overlay */
.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.game-overlay.hidden {
    display: none;
}

.game-overlay-header {
    background: #111;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.game-overlay-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.btn-close-game {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
}

.btn-close-game:hover {
    color: #ff5252;
}

/* Mobile: kleines X oben rechts */
.btn-close-game-mobile {
    display: none;
}

/* Desktop Header sichtbar */
.game-desktop-only {
    display: flex;
}

/* Steuerungsleiste (Pause/Neustart) */
.game-controls-bar {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2100;
    display: flex;
    gap: 10px;
}

.game-controls-bar.hidden {
    display: none;
}

.game-ctrl-btn {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.game-ctrl-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.9);
}

.game-container {
    flex-grow: 1;
    position: relative;
    background: #000;
}

#game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Mobile Game Overlay */
@media (max-width: 768px) {
    .game-desktop-only {
        display: none !important;
    }

    .game-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        display: flex;
        flex-direction: column;
        background: #000;
        z-index: 9999;
    }

    .game-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    #game-iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        border: none;
    }

    .btn-close-game-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 10002;
        width: 36px;
        height: 36px;
        background: rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        color: white;
        font-size: 1.1rem;
        backdrop-filter: blur(5px);
        cursor: pointer;
        pointer-events: auto;
    }

    .game-controls-bar {
        position: fixed;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10001;
    }

    .virtual-gamepad {
        position: fixed !important;
        bottom: 15px !important;
        left: 0;
        width: 100%;
        z-index: 10001;
    }
}
