@media only screen and (max-width: 375px) {

    #shareCount {
        display: none;
    }

}

@media only screen and (max-width: 589px) {

    #subarticleControls {
        display: flex;
        flex-direction: column !important;
        justify-content: flex-start;
        margin: 0px auto auto auto;
        padding: 12px 12px 12px 0px;
        width: 100%;
        gap: 18px !important;
    }

    #articleControlButtons { 
        margin-left: 3px !important;
    }

    .oneResponse {
        width: 90%;
    }

}

#wrapContent {
    display: flex;
    gap: 100px;
}

#mainCont {
    max-width: 700px;
    margin: 64px auto auto auto;
}

#articleImage {
    display: none;
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.authorContainer {
    margin: auto 0px auto 0px;
}

#title {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Source Serif 4', sans-serif;
    font-size: 2.8rem;
    margin: 30px auto auto 0px;
    width: 100%;
    color: black;
}

.lightBreakResponse {
    height: 1px;
    background-color: rgb(226, 226, 226);
    display: block;
    width: 100%;
    margin: 18px auto 24px auto;
}

.lightBreakResponseBottom {
    height: 1px;
    background-color: rgb(226, 226, 226);
    display: block;
    width: 100%;
    margin: 32px auto 24px auto;
}

#responseInsert {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: 18px;
}

.oneResponse {
    margin: auto auto auto 0px;
    width: 95%;
}

.responseTitle {
    margin-bottom: 4px;
    font-size: 20px;
    text-decoration: none;
    color: black;
    font-family: 'PT Serif', sans-serif;
}

.responseTitle:hover {
    text-decoration: underline;
}

.responseAuthor {
    color: rgb(178,178,178);
    text-decoration: none;
}

.oneResponseTop {
    display: flex;
    flex-direction: column;
}

.heuristics {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 18px;
}

.responseViews, .responses {
    display: flex;
    flex-direction: row;
    position: relative;
    margin: auto 0px auto 0px;
    text-align: left;
    font-size: 12px;
    padding-right: 6px;
    font-family: 'Inter', sans-serif;
    color: rgb(178,178,178);
}

.rightHeuristics {
    display: flex;
    flex-direction: row;
    margin: 5px auto auto 0px;
    gap: 12px;
}

#responseTitleWrap {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    margin: auto auto auto 0px;
    gap: 10px;
}

#responseTree {
    background: none;
    outline: none;
    margin: auto auto auto 0px;
    position: relative;
    border-radius: 50%;
    padding: 0px;

    border: 1px solid transparent;
    width: 50px;
    height: 50px;
    transition-duration: 0.2s;

}

#responseTreeImg {
    position: relative;
    bottom: 1px;
    margin: auto;
    filter: brightness(0%) invert(100%) sepia(1%) saturate(611%) hue-rotate(192deg) brightness(104%) contrast(68%);
}

#responseTree:hover {
    background-color: rgba(228, 228, 228, 0.2);
    border: 1px solid rgb(209, 209, 209);
}

#numResponses {
    margin-left: 6px;
    font-weight: bold;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    margin: auto 0px auto 0px;
}

#seeAllResponses {
    background: none;
    outline: none;
    border: none;
    color: blue;
    font-weight: 500;
    margin: 0px auto auto auto;
    text-align: center;
    display: none;
}

.responseViewText, .responseResponses {
    display: flex;
    flex-direction: row;
    position: relative;
    left: 4px;
    margin: auto auto auto 0px;
    text-align: left;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    color: rgb(178,178,178);
}

.responseIcon {
    height: 18px;
    width: 18px;
    margin: auto auto auto 0px;
    position: relative;
}

.top {
    margin-top: 26px !important;
}

.lightBreak {
    height: 1px;
    background-color: rgb(226, 226, 226);
    display: block;
    width: 100%;
    margin: 32px auto 32px auto;
}

#subarticleControls {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    margin: 0px auto auto auto;
    padding: 12px 12px 12px 0px;
    width: 100%;
    gap: 12px;
}

.rightSectionArticleControls {
    margin-top: 14px;
}

.topMargin {
    margin-top: 24px;
}

#articleControlButtons {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    margin: 0px auto 0px 0px;
}

.rightSectionArticleStats {
    margin: auto auto auto 32px !important;
}

#articleContent {
    white-space: pre-wrap;
    margin-top: 32px;
    font-family: 'Source Serif 4', sans-serif;
    font-size: 20px;
    color: #212427;
}

#linkPopup {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

#linkPopup input {
    width: 200px;
    padding: 5px;
    margin-right: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#linkPopup button {
    padding: 5px 10px;
    border: none;
    background: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

#linkPopup button:hover {
    background: #0056b3;
}

#sideContent {
    width: 23%;
    margin-left: -10%;
    margin-right: 10%;
}

#commentContainer {
    margin-top: 400px;
    /* I am aware that this is bad, not sure how to do better right now */
    max-height: 1000px;
    overflow-y: scroll;
}

#noResponders {
    margin: auto;
}

#noRespondersText {
    font-family: 'Source Serif 4', sans-serif;
    margin: auto;
    font-size: 24px;
    text-align: center;
}

#addResponseButton,
#respondLink {
    display: block;
    text-decoration: none;
    margin: 12px auto auto auto;
    width: 115px;
    font-size: 14px;
    text-align: center;
    color: white;
    background-color: rgb(14, 107, 168);
    padding: 4px 6px 4px 6px;
    border-radius: 4px;
    font-weight: 500;
    font-family: 'Open Sans', sans-serif;
    border: none;
}

#respondingTo {
    display: none;
    margin-top: 12px;
}

/*reactions*/
#reactionsSection {
    margin: 6px 0;
    padding: 4px 0;
}

.reactions-container {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f6f9fc;
    border: 1px solid #ccd1d6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    min-width: 50px;
    justify-content: center;
}

.reaction-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reaction-btn.active {
    background: #0e6ba8;
    border-color: #0e6ba8;
    color: white;
    transform: scale(1.05);
}

.reaction-btn.active:hover {
    background: #0e6ba8;
    border-color: #0e6ba8;
}

.reaction-emoji {
    font-size: 16px;
    line-height: 1;
}

.reaction-count {
    font-weight: 500;
    font-size: 13px;
    color: #6c757d;
    min-width: 16px;
    text-align: center;
}

.reaction-btn.active .reaction-count {
    color: white;
}

.reaction-count:empty,
.reaction-count[data-count="0"] {
    display: none;
}

@media (max-width: 768px) {
    .reactions-container {
    gap: 8px;
    }
    .reaction-btn {
    padding: 6px 10px;
    font-size: 13px;
    }
    .reaction-emoji {
    font-size: 14px;
    }
}

@keyframes reactionPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.reaction-btn.reacted {
    animation: reactionPulse 0.3s ease;
}


.shareButton {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    margin-left: 12px;
}

.shareButton:hover {
    opacity: 0.7;
}

.shareButton:active {
    transform: scale(0.95);
}

.shareIcon {
    font-size: 22px !important;
    color: rgb(178, 178, 178);
    filter: brightness(0%) invert(70%);
    height: 22px;
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.material-symbols-outlined {
    font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

.noResponsesMessage {
    text-align: center;
    font-family: 'Source Serif 4', sans-serif;
    margin: 40px 0;
    font-size: 18px;
    color: black;
}

#responseInsert {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: 0;
}

.responsesTitle a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #cecbcb;
}

.responsesTitle a:hover {
    border-bottom: 1px solid black;
}