@media screen {
    main {
        max-width: 90vw;
        margin: 0 auto;
    }

    .subtitle {
        text-align: center;
        margin-bottom: 2rem;
        font-size: 1.1rem;
    }

    .search-container {
        display: flex;
        justify-content: center;
        margin-bottom: 2rem;
    }

    .search-box {
        display: flex;
        max-width: 500px;
        width: 100%;
    }

    #username {
        flex: 1;
        padding: 0.8rem 1rem;
        background-color: #1e1e1e;
        border: 2px solid #333;
        border-right: none;
        border-radius: 8px 0 0 8px;
        color: white;
        font-size: 1rem;
        outline: none;
        transition: border-color 0.3s;
    }

    #username:focus {
        border-color: #bb86fc;
    }

    #search-btn {
        padding: 0 1.5rem;
        background-color: #bb86fc;
        color: black;
        border: none;
        border-radius: 0 8px 8px 0;
        cursor: pointer;
        font-size: 1rem;
        font-weight: 600;
        transition: background-color 0.3s;
    }

    #search-btn:hover {
        background-color: #a370d9;
    }

    .loading {
        text-align: center;
        margin: 2rem 0;
        display: none;
    }

    .spinner {
        border: 4px solid #222;
        border-radius: 50%;
        border-top: 4px solid #bb86fc;
        width: 40px;
        height: 40px;
        animation: spin 1s linear infinite;
        margin: 0 auto 1rem;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    .error {
        color: #ff6b6b;
        background-color: #222;
        padding: 1rem;
        border-radius: 8px;
        margin: 2rem 0;
        text-align: center;
        display: none;
    }

    .general-container {
        display: grid;
        background-color: #1e1e1e;
        border-radius: 8px;
        overflow: hidden;
        width: 90vw;
    }

    .general-mal {
        padding: 1rem;
    }

    .profile-container {
        display: none;
        background-color: #1e1e1e;
        border-radius: 8px;
        overflow: hidden;
        width: 90vw;
    }

    .general-stats, .general-lists{
        padding: 1rem;
    }

    .section-title {
        font-size: 1.3rem;
        color: #bb86fc;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid #333;
    }

    .list-title {
        display: grid;
        grid-template-columns: 40px 42px auto repeat(4, 50px);
        background-color: #2c2c2e;
        border-block: 2px solid #222;
    }

    .list-item {
        display: grid;
        grid-template-columns: 40px 42px auto repeat(4, 50px);
        background-color: #2c2c2e;
        border-block: 2px solid #222;
    }

    .list-item:hover {
        outline: 2px solid white;
    }

    .list-id {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.25rem;
        border-right: 2px solid #222;
    }

    .list-image {
        padding: 0.25rem;
        width: 30px;
        height: auto;
        border-inline: 2px solid #222;
    }

    .list-info {
        padding: 0.25rem;
        display: grid;
        grid-template-rows: auto auto;
        border-inline: 2px solid #222;
        overflow: hidden;
    }

    .list-info p {
        box-sizing: border-box;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .list-genre {
        display: flex;
        flex-wrap: wrap;
        gap: 0rem 0.5rem;
    }

    .list-genre a {
        background-color: #444;
        color: #fff;
        padding: 0.1rem 0.5rem;
        border-radius: 4px;
        font-size: 0.85rem;
        text-decoration: none;
        white-space: nowrap;
        transition: background-color 0.2s;
    }

    .list-data {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.25rem;
        border-inline: 2px solid #222;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .list-data-first {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.25rem;
        border-right: 2px solid #222;
    }

    .list-data-last {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.25rem;
        border-left: 2px solid #222;
    }
}