body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    color: #1c1e21;
    line-height: 1.6;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dadde1;
}

#profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 20px;
    object-fit: cover;
    border: 2px solid #f0f2f5;
}

#profile-username {
    font-size: 2em;
    font-weight: 700;
    margin: 0;
    color: #1c1e21;
}

.profile-container {
    max-width: 960px;
    margin: 30px auto;
    padding: 30px 20px 20px;
    background-color: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.tabs {
    margin-bottom: 25px;
    border-bottom: 1px solid #dadde1;
}

.tab-button {
    padding: 12px 18px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    color: #606770;
    margin-right: 8px;
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;
}

.tab-button.active {
    color: #007bff; 
    border-bottom-color: #007bff;
}

.tab-button:hover:not(.active) {
    color: #333;
    background-color: #f0f2f5; 
    border-radius: 6px 6px 0 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    font-size: 1.6em;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1c1e21;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.item-card {
    background-color: #ffffff;
    border: 1px solid #dddfe2;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.item-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.item-thumbnail-wrapper {
    width: 100%;
    padding-top: 66.66%; 
    position: relative;
    background-color: #f0f2f5;
}

.item-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-info {
    padding: 15px;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
}

.item-title {
    font-size: 1.15em;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1c1e21;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6em; 
}

.item-creator {
    font-size: 0.9em;
    color: #606770;
    display: flex;
    align-items: center;
    margin-top: auto; 
}

.item-creator img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.loading-message, .error-message, .empty-message {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.1em;
    color: #606770;
}

.error-message {
    color: #d93025; 
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .profile-container {
        margin: 15px;
        padding: 15px;
    }
    .tabs {
        display: flex;
        justify-content: space-around; 
    }
    .tab-button {
        padding: 10px;
        font-size: 1em;
        flex-grow: 1; 
        text-align: center;
    }
    .grid-container {
        grid-template-columns: 1fr; 
    }
}