/* FUNGAMES Admin style.css | V1.0 Responsive */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f4f4;
    color: #333;
    line-height: 1.5;
}

/* === LOGIN PAGE === */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    background: #2C6338;
    color: white;
    padding: 30px;
    border-radius: 8px;
    width: 320px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5em;
    font-weight: 600;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #6FFF90;
    color: #2C6338;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.login-box button:hover {
    background: #3487FF;
    color: white;
}

.login-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 0.75em;
    color: #ccc;
}

.login-version {
    text-align: right;
    margin-top: 15px;
    font-size: 0.65em;
    color: #aaa;
}

.error-msg {
    background: #fff0f0;
    color: #c00;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.9em;
    text-align: center;
}

/* === SIDEBAR === */
.sidebar {
    width: 240px;
    background: #2C6338;
    color: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding-top: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Sidebar Branding */
.sidebar-brand {
    text-align: center;
    padding: 20px 15px 5px 15px;
    border-bottom: 1px solid #1e4627;
}

.sidebar-brand .brand-name {
    font-size: 1.8em;
    font-weight: 800;
    color: #FFD700 !important;
    letter-spacing: 2px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    text-align: center;
}

.sidebar-brand .brand-subtitle {
    font-size: 0.85em;
    color: #acd5b5;
    margin-top: 2px;
    font-weight: 400;
    text-align: center;
}

/* Sidebar Flags */
.sidebar-flags {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border-bottom: 1px solid #1e4627;
}

.sidebar-flags a {
    display: inline-block;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.sidebar-flags a:hover {
    opacity: 1;
    transform: scale(1.15);
}

.sidebar-flags img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

/* Sidebar Navigation */
.sidebar nav {
    flex: 1;
}

.sidebar nav a {
    display: block;
    padding: 13px 20px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid #1e4627;
    font-size: 0.95em;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #3487FF;
}

/* Game Section Header in Navigation */
.nav-game-header {
    padding: 10px 20px 4px 20px;
    color: #FFD700;
    font-size: 0.95em;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-top: 1px solid #1e4627;
    margin-top: 4px;
}

/* Sidebar Logout */
.sidebar-logout {
    padding: 10px 20px 20px 20px;
}

.sidebar-logout .btn {
    width: 100%;
    text-align: center;
    display: block;
}

/* Hamburger Button */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1100;
    background: #2C6338;
    color: #FFD700;
    border: none;
    border-radius: 6px;
    width: 48px;
    height: 48px;
    font-size: 2em;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    line-height: 48px;
    text-align: center;
    padding: 0;
}

.hamburger-btn:hover {
    background: #3487FF;
    color: white;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* === MAIN CONTENT === */
.main {
    margin-left: 240px;
    padding: 20px;
    min-height: 100vh;
}

/* === PAGE HEADER === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.page-header-left {
    /* z.B. HOLD box */
}

.page-header-center {
    flex: 1;
}

.page-header-right {
    text-align: right;
    font-size: 0.7em;
    color: #999;
    line-height: 1.3;
    white-space: nowrap;
    flex-shrink: 0;
}

.page-header-right .user-name {
    font-weight: 600;
    color: #666;
    font-size: 1em;
}

.page-header-right .user-meta {
    font-size: 0.9em;
    color: #aaa;
}

/* === PAGE FOOTER === */
.page-footer {
    text-align: right;
    padding: 10px 20px;
    font-size: 0.65em;
    color: #aaa;
}

/* === COMMON ELEMENTS === */
.container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    max-width: 1000px;
}

.page-title {
    color: #2C6338;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2C6338;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95em;
    transition: background 0.2s;
}

.btn:hover {
    background: #3487FF;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

/* === TABLES === */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    min-width: 600px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

th {
    background: #f8f8f8;
    font-weight: 600;
    color: #2C6338;
}

tr:hover {
    background: #f5f5f5;
}

/* === FORMS === */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

/* === MESSAGES === */
.msg-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.msg-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* === FILTER BAR === */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 6px;
    margin-bottom: 20px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    font-weight: 600;
    color: #555;
}

.filter-item select,
.filter-item input[type="date"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-filter {
    padding: 8px 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-filter:hover {
    background: #5a6268;
}

/* === STATUS DOT === */
.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-dot.online {
    background: #28a745;
}

.status-dot.offline {
    background: #dc3545;
}

/* === HOLD BOX === */
.hold-box {
    border: 2px solid #dc3545;
    padding: 8px 15px;
    font-weight: bold;
    color: #dc3545;
    display: inline-block;
}

/* === HELP SECTION === */
.help-section {
    margin-top: 20px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fafafa;
}

.help-toggle {
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 600;
    color: #2C6338;
    font-size: 0.9em;
    user-select: none;
    list-style: none;
}

.help-toggle::-webkit-details-marker {
    display: none;
}

.help-toggle::before {
    content: "▸ ";
}

details[open] .help-toggle::before {
    content: "▾ ";
}

.help-toggle:hover {
    color: #3487FF;
}

.help-content {
    padding: 15px 20px;
    border-top: 1px solid #d0d0d0;
    font-size: 0.85em;
    color: #444;
    line-height: 1.7;
}

.help-content h2 {
    color: #2C6338;
    font-size: 1.1em;
    margin: 15px 0 8px 0;
}

.help-content h2:first-child {
    margin-top: 0;
}

.help-content h3 {
    color: #555;
    font-size: 1em;
    margin: 12px 0 5px 0;
}

.help-content p {
    margin: 5px 0;
}

.help-content strong {
    color: #333;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    /* Hamburger sichtbar */
    .hamburger-btn {
        display: block;
    }

    /* Sidebar ausblenden */
    .sidebar {
        transform: translateX(-240px);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Main ohne Margin */
    .main {
        margin-left: 0;
        padding: 60px 10px 10px 10px;
    }

    /* Container volle Breite */
    .container {
        padding: 15px;
        border-radius: 4px;
    }

    /* Page Header stacked */
    .page-header {
        flex-wrap: wrap;
        gap: 5px;
    }

    .page-header-right {
        text-align: right;
        font-size: 0.6em;
        width: 100%;
    }

    .page-header-center {
        flex: 1;
    }

    /* Filter Bar stacked */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px;
    }

    .filter-item {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .filter-item select,
    .filter-item input[type="date"] {
        width: 100%;
    }

    .filter-buttons-row {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .filter-buttons-row .btn-filter {
        flex: 1;
        text-align: center;
    }

    /* Tabellen scrollbar */
    .table-wrapper {
        margin: 0 -15px;
        padding: 0 15px;
    }

    /* Inline style overrides */
    input[style*="width: 300px"],
    input[style*="width: 250px"],
    input[style*="width: 200px"],
    input[style*="width: 150px"],
    select[style*="width: 300px"],
    select[style*="width: 250px"],
    select[style*="width: 200px"],
    select[style*="width: 150px"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Edit forms sections */
    div[style*="padding: 20px"] {
        padding: 12px !important;
    }

    /* Page title kleiner */
    .page-title {
        font-size: 1.15em;
    }

    /* Buttons in Tabellen */
    td .btn {
        padding: 4px 8px;
        font-size: 0.8em;
        margin-bottom: 2px;
        display: inline-block;
    }

    /* Permissions Tabelle */
    .perm-table td, .perm-table th {
        padding: 6px 4px;
        font-size: 0.85em;
    }

    .perm-checkbox {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .login-box {
        width: 92%;
        padding: 20px;
        margin: 10px;
    }

    .hold-box {
        font-size: 0.9em;
        padding: 6px 10px;
    }

    .sidebar-brand .brand-name {
        font-size: 1.5em;
    }
}
