@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    display: flex;
    justify-content: center;
    height: 100%;
    background-color: lightgray;
    font-family: Poppins, 'Segoe UI', sans-serif;
    scrollbar-gutter: stable;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0 20px 0;
    font-size: 1rem;
    background-color: lightskyblue;
}

body {
    display: flex;
    flex-direction: column;
    background-color: lightblue;
    width: 100%;
    max-width: 1440px;
    min-width: 380px;
    height: 100%;
}

main {
    display: flex;
    background-color: lightblue;
    padding: 20px;
}


.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    align-content: flex-start;
    max-width: 50%;
    gap: 20px;
}

.card {
    width: 200px;
    height: 300px;
    background-color: whitesmoke;
    border: 1px solid black;
    border-radius: 20px;
    margin: 10px;
    font-family: Tahoma, sans-serif;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
}

.card.has-description .card-bottom-center .mark:nth-child(1) {
    background-color: #2e7d32;
}

.card.has-close-matches .card-bottom-center .mark:nth-child(2) {
    background-color: #1a73e8;
}

.card.has-note .card-bottom-center .mark:nth-child(3) {
    background-color: #c62828;
}

.card-container.has-selection .card:not(.card-selected) {
    opacity: 0.65;
    filter: grayscale(30%);
}

.card-selected {
    border: 2px solid #1a73e8;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.5);
    transform: scale(1.1);
    background-color: #eef4ff;
}

.card-symbol {
    font-size: 6rem;
    font-family: 'Noto Sans Symbols 2', sans-serif;
    width: 50%;
    height: 50%;
    margin: 1rem auto 0 auto;
    text-align: center;
}

.card-top {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    padding: 10px;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    padding: 10px;

}

.card-top-left {
    width: 50%;
    justify-self: start;

}

.card-top-right {
    width: 50%;
    text-align: right;

}

.card-symbol-caption {
    text-align: center;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

.card-bottom-left {
    width: 25%;
    justify-self: start;
}

.card-bottom-right {
    width: 25%;
    text-align: right;
}

.card-bottom-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.mark {
    width: 0.5rem;
    height: 0.5rem;
}

aside {
    position: sticky;
    top: 100px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50%;
    min-width: 330px;
    height: 900px;
    background-color: skyblue;
    border-radius: 20px;
    margin: 10px;
    font-family: Tahoma, sans-serif;
    font-size: 1rem;
}


.aside-title {
    text-align: center;
    font-size: 1.2rem;
    margin: 20px 10px 10px 10px;
}

.aside-content {
    text-align: justify;
    font-size: 1rem;
    width: 90%;
    min-width: 300px;
    height: 530px;
    overflow-y: auto;
    background-color: whitesmoke;
    padding: 0 20px;
    margin: 0 10px 10px 10px;
    scrollbar-width: thin;
    scrollbar-color: #8ab4d6 transparent;
}

.aside-content> :first-child {
    margin-top: 15px;
}

.aside-content> :last-child {
    margin-bottom: 15px;
}

.aside-content h2 {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 1.2rem;
    margin: 2rem 0 1rem 0;
    text-align: center;
    color: #1a3a5c;
}

.aside-content::-webkit-scrollbar {
    width: 6px;
}

.aside-content::-webkit-scrollbar-track {
    background: transparent;
}

.aside-content::-webkit-scrollbar-thumb {
    background-color: #8ab4d6;
    border-radius: 3px;
}

.aside-content::-webkit-scrollbar-thumb:hover {
    background-color: #5a94bf;
}

.aside-content ul {
    list-style: disc;
    padding-left: 1.2em;
    margin: 0;
}

.aside-content li {
    margin-bottom: 0.8em;
    line-height: 1.2;
}

.aside-content li strong {
    color: #1a3a5c;
}

.aside-content li em {
    font-style: italic;
    color: #555;
}

/* Categories list (first section): badge chips */
.aside-content>h2:first-of-type+ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    list-style: none;
    padding-left: 0;
    margin: 0 0 1rem 0;
    justify-content: center;
}

.aside-content>h2:first-of-type+ul>li {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
    padding: 0.35em 0.85em;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: #1a3a5c;
    background: linear-gradient(180deg, #eef4ff, #e2ebf7);
    border: 1px solid #8ab4d6;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(26, 58, 92, 0.08);
}

.aside-content>h2:first-of-type+ul>li:hover {
    background: linear-gradient(180deg, #e4edfc, #d8e4f4);
}

.aside-notes {
    text-align: center;
    font-size: 1.2rem;
    margin: 1cqmax 10px 10px 10px;
}

.aside-notes-content {
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    width: 90%;
    min-width: 300px;
    height: 200px;
    resize: none;
    overflow-y: auto;
    background-color: whitesmoke;
    padding: 15px 20px;
    margin: 0 10px 10px 10px;
    border: 2px solid transparent;
    border-radius: 6px;
    outline: none;
    scrollbar-width: thin;
    scrollbar-color: #8ab4d6 transparent;
    transition: border-color 0.2s;
}

.aside-notes-content:focus {
    border-color: #1a73e8;
}

.aside-notes-content:disabled {
    background-color: #e8e8e8;
    cursor: not-allowed;
    opacity: 0.6;
}

.aside-notes-buttons {
    display: flex;
    gap: 10px;
    width: 90%;
    min-width: 300px;
    margin: 0 10px 10px 10px;
}

.aside-notes-buttons button {
    flex: 1;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #8ab4d6;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-clear-note {
    color: #c62828;
    background-color: #fce4ec;
}

.btn-clear-note:hover:not(:disabled) {
    background-color: #f8bbd0;
}

.btn-clear-note:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-copy-all-notes {
    color: #1a3a5c;
    background-color: #eef4ff;
}

.btn-copy-all-notes:hover {
    background-color: #d8e4f4;
}

footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: Tahoma, sans-serif;
    font-size: 1rem;
    background-color: lightskyblue;
}

@media screen and (max-width: 760px) {

    html {
        font-size: 14px;
    }

    body {
        width: 100%;
    }

    .card-container {
        min-width: 200px;
        gap: 10px;
    }

    .card {
        width: 160px;
        /* 200 * 0.8 */
        height: 240px;
        /* 300 * 0.8 */
        font-size: 0.8rem;
    }


    aside {
        max-width: 500px;
    }


}