body {
    margin: 0;
    font-family: sans-serif;
    display: flex;
    height: 100vh;
    background-color: #f5f5f5;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 160px;
    background-color: #0d47a1;
    color: white;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 1000;
    border-radius: 15px;
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

/* KingsClash Logo Styles */
.kingsclash-logo {
    font-family: 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: 0px;
    text-align: center;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
    box-sizing: border-box;
}

.kingsclash-text {
    font-size: 19px !important;
    color: white !important;
    line-height: 1;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    letter-spacing: 0px;
    box-sizing: border-box;
    white-space: nowrap;
    display: block;
}

.kingsclash-logo .dot-net {
    color: #4FC3F7 !important;
    font-weight: 600;
    font-size: 10px !important;
    margin: 0;
    text-align: center;
    width: 100%;
    padding-right: 0px;
    box-sizing: border-box;
    align-self: center;
}

/* Mobile Anpassungen für das Logo */
@media (max-width: 767px) {
    .kingsclash-text {
        font-size: 25px !important;
    }
    
    .kingsclash-logo .dot-net {
        font-size: 25px;
        padding-right: 0px;
        text-align: center;
        align-self: center;
    }
}

.sidebar-buttons {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.sidebar.collapsed {
    width: 40px;
    align-items: center;
}

.toggle-btn {
    font-size: 24px;
    color: white;
    cursor: pointer;
    margin-bottom: 10px;
    margin-left: 16px;
    transition: all 0.3s ease;
}

.sidebar.collapsed .toggle-btn {
    margin-left: 0;
}

.sidebar-footer {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.sidebar button {
    width: 120px;
    padding: 10px;
    background-color: #0a3d91;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.sidebar.collapsed button {
    width: 30px;
    padding: 10px;
    margin-left: 0;
}

.sidebar button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.sidebar button:hover::before {
    left: 100%;
}

.sidebar button:hover {
    background-color: #0d47a1;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3);
}

.sidebar button span {
    transition: opacity 0.3s, width 0.3s;
    white-space: nowrap;
}

.sidebar.collapsed button span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-logo {
    display: none;
}

a {
    text-decoration: none;
}

.main-content {
    flex: 1;
    margin-left: 100px;
    padding: 20px;
    transition: margin-left 0.3s;
    width: calc(100% - 100px);
    box-sizing: border-box;
}

body.sidebar-collapsed .main-content {
    margin-left: 40px;
    width: calc(100% - 40px);
}

/* ===== MOBILE FIRST RESPONSIVE DESIGN ===== */

/* Mobile (unter 768px) - Sidebar als Overlay */
@media (max-width: 767px) {
    /* Standardmäßig zusammengefaltet auf Mobile */
    .sidebar {
        width: 40px !important;
        align-items: center !important;
        padding: 10px !important;
        z-index: 1001 !important;
    }
    
    .sidebar-logo {
        display: none !important;
    }
    
    .sidebar button {
        width: 30px !important;
        padding: 10px !important;
    }
    
    .sidebar button span {
        opacity: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }
    
    .toggle-btn {
        margin-left: 0 !important;
        margin-bottom: 15px !important;
    }
    
    .main-content {
        margin-left: 40px !important;
        width: calc(100% - 40px) !important;
        padding: 10px !important;
    }
    
    /* Body-Klasse für Mobile-Sidebar-Status */
    body.mobile-sidebar-collapsed .main-content {
        margin-left: 40px !important;
        width: calc(100% - 40px) !important;
    }
    
    /* Wenn Sidebar ausgeklappt wird - Overlay-Modus */
    .sidebar:not(.collapsed) {
        width: 100vw !important;
        height: 100vh !important;
        padding: 20px !important;
        /* Behalte die ursprüngliche Farbe bei */
        z-index: 1002 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
    }
    
    .sidebar:not(.collapsed) .sidebar-logo {
        display: block !important;
    }
    
    .sidebar:not(.collapsed) button {
        width: 120px !important;
        margin: 5px 0 !important;
    }
    
    .sidebar:not(.collapsed) button span {
        opacity: 1 !important;
        width: auto !important;
    }
    
    .sidebar:not(.collapsed) .toggle-btn {
        margin-left: 16px !important;
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        font-size: 28px !important;
    }
    
    /* Hauptinhalt bleibt unverändert wenn Sidebar offen ist */
    body:not(.sidebar-collapsed) .main-content {
        margin-left: 40px !important;
        width: calc(100% - 40px) !important;
    }
    
    /* Overlay-Hintergrund entfernt - behalte ursprüngliche Farbe */
    /* .sidebar:not(.collapsed)::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    } */
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .main-content {
        margin-left: 60px;
        width: calc(100% - 60px);
        padding: 15px;
    }
    
    body.sidebar-collapsed .main-content {
        margin-left: 40px;
        width: calc(100% - 40px);
    }
} 