.bg-pixel-card {
    background: var(--stardew-gradient);
    border-style: solid;
    border-width: 20px;
    border-image-source: url('../../images/stardew_valley/border.png');
    border-image-slice: 24 22;
    border-image-repeat: round;
    border-radius: 20px;
    padding: 2em !important;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
}

.bg-pixel-card h2 {
    font-family: 'StardewValleyBold', var(--font-pixel);
    color: var(--stardew-text);
    text-shadow: var(--stardew-text-shadow) -2px 1px;
    font-size: 2.2rem;
}

.bg-pixel-card .pixel-text,
.bg-pixel-card .lead {
    font-family: 'StardewValley', var(--font-pixel);
    color: var(--stardew-text);
    font-size: 1.8rem;
    line-height: 1.6;
}

.bg-pixel-card .status-bar .badge,
.bg-pixel-card .status-bar a.badge {
    background-color: var(--stardew-container);
    color: var(--stardew-text);
    border-style: solid;
    border-width: 15px;
    border-image-source: url('../../images/stardew_valley/tooltip_border.png');
    border-image-slice: 24 22;
    border-image-repeat: round;
    border-radius: 15px;
    font-family: 'StardewValley', var(--font-pixel);
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    padding: 8px 12px !important;
    text-shadow: var(--stardew-text-shadow) -1px 1px;
    filter: drop-shadow(3px 3px rgba(0, 0, 0, 0.3));
    text-decoration: none;
}

.portrait-npc {
    max-width: 280px;
    width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;
    image-rendering: pixelated;
}

.stardew-dialogue-box {
    background-color: #e8d4a0;
    border: 15px solid;
    border-image: url('../../images/stardew_valley/tooltip_border.png') 24 22 round;
    padding: 25px 30px;
    display: flex;
    align-items: flex-start;
    gap: 25px;
    font-family: var(--font-pixel);
    image-rendering: pixelated;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.stardew-dialogue-box::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: none;
    z-index: -1;
    pointer-events: none;
}

.portrait-container {
    flex-shrink: 0;
    padding: 8px;
    background-color: #c9a870;
    box-shadow:
        0 0 0 3px #8b6f47,
        inset 2px 2px 4px rgba(0,0,0,0.2);
    border-radius: 4px;
}

.pixel-portrait {
    width: 128px;
    height: 128px;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.dialogue-content {
    flex: 1;
    color: #3d2f1f;
}

.dialogue-title {
    font-size: 1.6rem;
    color: #2d1f0f;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
}

.dialogue-text {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #4a3b24;
    margin-bottom: 15px;
}

.stardew-badge {
    background-color: #8b6f47;
    color: #f5e6c8;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 1rem;
    box-shadow:
        0 0 0 2px #5d4a37,
        2px 2px 0 rgba(0,0,0,0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stardew-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.dialogue-tabs-container {
    padding-left: 32px;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
}

.dialogue-tab {
    border-image-source: url('../../images/stardew_valley/tab_border.png');
    border-style: solid;
    border-width: 20px;
    border-image-slice: 24 22;
    border-image-repeat: round;
    border-radius: 20px;
    width: 88px;
    height: 84px;
    position: relative;
    display: flex;
    justify-content: center;
    background: var(--stardew-gradient);
    padding: 0;
}

.dialogue-tab--active {
    height: 72px;
}

.dialogue-tab-img {
    height: 48px;
    width: auto;
}

.dialogue-tab::before,
.dialogue-tab::after {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.dialogue-tab::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, calc(100% + 15px));
    padding: 10px;
    font-family: 'StardewValley', var(--font-pixel);
    font-size: 2rem;
    line-height: 1.1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    white-space: nowrap;
    color: var(--stardew-text);
    text-shadow: var(--stardew-text-shadow) -2px 1px;
    filter: drop-shadow(5px 5px rgba(0, 0, 0, 0.3));
    border-style: solid;
    border-width: 20px;
    border-image-slice: 24 22;
    border-image-repeat: round;
    border-radius: 20px;
    border-image-source: url('../../images/stardew_valley/tooltip_border.png');
    background-color: var(--stardew-container);
    z-index: 100;
}

.dialogue-tab:hover::before,
.dialogue-tab:hover::after {
    visibility: visible;
    opacity: 1;
    z-index: 120;
}

.dialogue-content-box {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 320px;
    overflow-y: auto;
}

.stardew-spotify-player {
    margin-top: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 100%;
    padding: 0.5em 0;
    text-align: center;
}

.stardew-dancing-npc {
    width: 100px;
    height: auto;
    padding-top: 2rem;
    image-rendering: pixelated;
    filter: drop-shadow(-6px 6px rgba(0, 0, 0, 0.25));
}

.stardew-spotify-player .stardew-spotify-link {
    display: inline-block;
    max-width: 100%;
    margin-top: -4rem;
    text-decoration: none;
    line-height: 0;
}
    
#stardew-dialogue-root.stardew-dialogue--no-spotify .dialogue-tab[data-tab="spotify"] {
    display: none !important;
}

#stardew-dialogue-root.stardew-dialogue--no-spotify #tab-spotify {
    display: none !important;
}
