body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f9f9f9;
    position: relative;
}

header {
    background-color: #4CAF50;
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    width: auto;
}

header .logo img {
    width: 50px;
    height: 50px;
    vertical-align: middle;
}

header h1 {
    display: inline-block;
    margin: 0 10px;
    font-size: 24px;
}

header p {
    margin: 10px 0 0;
    font-size: 14px;
}

nav {
    width: 200px;
    background-color: #333;
    color: white;
    position: fixed;
    height: 100%;
    top: 0;
    left: 0;
    transition: 0.3s;
    z-index: 999;
}

nav ul {
    list-style: none;
    padding: 20px 0 0;
    margin: 0;
}

nav ul li {
    padding: 15px;
    text-align: center;
    transition: background-color 0.3s;
}

nav ul li:hover {
    background-color: rgba(255,255,255,0.1);
}

nav ul li a {
    color: white !important;
    text-decoration: none !important;
    font-size: 16px;
    display: block;
}

nav ul li a:hover {
    color: #4CAF50 !important;
}

#toggleSidebar {
    display: none;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    position: fixed;
    left: 10px;
    top: 10px;
    z-index: 1000;
}

main {
    margin-left: 200px;
    padding: 20px;
    transition: 0.4s;
}

section {
    margin-bottom: 20px;
}

section h2 {
    font-size: 22px;
    margin-bottom: 20px;
}


.website {
    display: inline-flex;
    align-items: center;
    width: 240px;  /* 固定宽度使尺寸更统一 */
    margin: 10px;
    padding: 12px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: left;
    border-radius: 8px;
}

.website img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 6px;
}

.website h3 {
    font-size: 14px;
    margin: 0;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.website a  {
    color: #333;
    text-decoration: none;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #4d4c4c;
    color: #D3D3D3;
    margin-top: 40px;
}

footer a {
    color: #D3D3D3;
    text-decoration: none;
}

footer a:hover {
    color: #4CAF50;
}

@media (max-width: 768px) {
    nav {
        left: -200px;
    }
    
    nav.active {
        left: 0;
    }

    #toggleSidebar {
        display: block;
    }

    main {
        margin-left: 0;
    }

    .website {
        width: 95%;
        margin: 8px 0;
        padding: 10px;
        margin-right: 10px;
    }
    
    .website img {
        margin-right: 12px;
    }
}