.profile-widget {
    background: var(--pt-widget-bg, rgba(0, 0, 0, 0.15));
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: var(--pt-shadow, 0 4px 6px rgba(0, 0, 0, 0.1));
}

.profile-widget h3 {
    background: var(--pt-widget-header-bg, rgba(0, 0, 0, 0.2));
    padding: 16px;
    margin: 0;
    font-size: 1.2em;
    color: var(--pt-text, #fff);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: var(--pt-text-shadow, 0 1px 2px rgba(0, 0, 0, 0.2));
    border-bottom: 1px solid var(--pt-divider, rgba(255, 255, 255, 0.1));
}

.profile-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--pt-divider-light, #eee);
}

.profile-widget ul li:last-child {
    border-bottom: none;
}

.profile-widget .comment {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--pt-divider-light, #eee);
}

.profile-widget .comment:last-child {
    border-bottom: none;
}

.profile-widget .comment-header {
    color: var(--pt-text-dim, #666);
    font-size: 12px;
    margin-bottom: 5px;
}

.profile-widget .comment-content {
    color: var(--pt-text, #333);
    line-height: 1.5;
}

.profile-widget .comment-form {
    margin-top: 20px;
}

.profile-widget .comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--pt-input-border, #ddd);
    border-radius: 4px;
    margin-bottom: 10px;
    resize: vertical;
}

.profile-widget .comment-form input[type="submit"] {
    background: var(--pt-accent, #4CAF50);
    color: var(--pt-accent-text, white);
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.profile-widget .comment-form input[type="submit"]:hover {
    background: var(--pt-accent-hover, #45a049);
}

.profile-widget .accordion {
    margin-bottom: 10px;
}

.profile-widget .accordion-header {
    background: var(--pt-surface-light, #f5f5f5);
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
}

.profile-widget .accordion-content {
    padding: 10px;
    display: none;
}

.profile-widget .accordion-content.active {
    display: block;
}

.profile-widget table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

/*
 * Override the site-wide table palette from style.css
 * (body cells #E5E5DB / #47433F, header cells #555555 / #FFF).
 * Without these, quest/achievement/other-char tables keep the stock
 * beige look even when a profile theme is active.
 */
.profile-widget table th,
.profile-widget table td {
    padding: 8px;
    text-align: left;
    background: var(--pt-item-bg, #E5E5DB);
    color: var(--pt-text, #47433F);
    border-top: 1px solid var(--pt-divider, #FFF);
    border-bottom: 1px solid var(--pt-divider-soft, transparent);
}

.profile-widget table th,
.profile-widget table tr.yellow td {
    background: var(--pt-widget-header-bg, #555555);
    color: var(--pt-text, #FFF);
    font-weight: bold;
}

/* Table links must follow cell text: the widget-wide a { #fff } rule is
   unreadable on the stock beige (#E5E5DB) table body. */
.profile-widget table a {
    color: var(--pt-link, #47433F);
}

.profile-widget table a:hover {
    color: var(--pt-link-hover, #47433F);
}

/* jQuery UI accordion used by quests + achievements show/hide panels */
.profile-widget .ui-accordion {
    margin: 10px 0;
}

.profile-widget .ui-accordion .ui-accordion-header {
    background: var(--pt-widget-header-bg, #bdbdbd) !important;
    color: var(--pt-text, #fff) !important;
    font-weight: bold;
    border: none !important;
    border-radius: 0 !important;
    padding: 10px !important;
    margin: 0 !important;
}

.profile-widget .ui-accordion .ui-accordion-header-active {
    background: var(--pt-item-bg-hover, #a0a0a0) !important;
}

.profile-widget .ui-accordion .ui-accordion-content {
    background: var(--pt-item-bg, #f6f6f2) !important;
    color: var(--pt-text, #222) !important;
    border: none !important;
    border-radius: 0 0 6px 6px !important;
    padding: 10px !important;
}

.profile-widget .ui-accordion .ui-accordion-header,
.profile-widget .ui-accordion .ui-accordion-content {
    /* Kill the jQuery UI base theme's light bevel / icon strip */
    background-image: none !important;
}

.profile-widget .achievement-image {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    vertical-align: middle;
}

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.info-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
}

.pokemon-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 2px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.pokemon-card {
    min-width: 90px;
    max-width: 100px;
    width: 95px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    padding: 2px;
}

.pokemon-card:hover {
    transform: translateY(-5px);
}

.pokemon-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 2px;
}

.pokemon-info {
    color: var(--pt-text, #fff);
    white-space: normal;
}

.pokemon-name {
    font-weight: bold;
    margin-bottom: 4px;
}

.pokemon-level {
    font-size: 0.8em;
    color: var(--pt-text-muted-alt, #aaa);
    text-align: center;
}

.no-pokemon {
    text-align: center;
    color: var(--pt-text-muted-alt, #aaa);
    padding: 20px;
    width: 100%;
}

.profile-widget#player_pokemon {
    overflow-x: auto;
}

.pokemon-species {
    font-size: 0.85em;
    color: var(--pt-text-dim, #666);
    margin-bottom: 1px;
    text-align: center;
}

.catches-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 5px;
}

.catches-row {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.catch-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    background: var(--pt-item-bg, rgba(0, 0, 0, 0.1));
    border-radius: 4px;
    flex: 1;
}

.catch-icon {
    width: 56px;
    height: 42px;
    object-fit: contain;
}

.catch-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.catch-species {
    font-size: 0.9em;
    color: var(--pt-text-dim, #666);
}

.catch-species.shiny {
    color: #FFD700;
}

.catch-level {
    font-size: 0.8em;
    color: var(--pt-text-muted, #999);
}

.catch-tries {
    font-size: 0.8em;
    color: var(--pt-text-muted, #999);
}

.catch-details {
    display: flex;
    gap: 12px;
    font-size: 0.8em;
    color: var(--pt-text-muted, #999);
}

.catch-level, .catch-tries {
    white-space: nowrap;
}

.no-catches {
    text-align: center;
    color: var(--pt-text-dim, #666);
    padding: 10px;
}

.catches-grid.special {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.catches-grid.special .catch-card {
    width: 100%;
}

.balance-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--pt-item-bg, rgba(0, 0, 0, 0.1));
    border-radius: 8px;
    transition: all 0.2s ease;
}

.balance-item:hover {
    background: var(--pt-item-bg-hover, rgba(0, 0, 0, 0.15));
    transform: translateY(-1px);
}

.balance-label {
    font-size: 0.9em;
    color: var(--pt-text-muted, #999);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-value {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--pt-text, #fff);
    text-shadow: var(--pt-text-shadow, 0 1px 2px rgba(0, 0, 0, 0.2));
}

.house-container {
    padding: 24px;
    background: var(--pt-item-bg, rgba(0, 0, 0, 0.1));
}

.house-header {
    margin-bottom: 24px;
    text-align: center;
}

.house-name {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--pt-text, #fff);
    text-shadow: var(--pt-text-shadow-strong, 0 2px 4px rgba(0, 0, 0, 0.3));
    margin-bottom: 8px;
}

.house-town {
    font-size: 1em;
    color: var(--pt-text-muted-alt, #aaa);
}

.house-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.house-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: var(--pt-item-bg, rgba(0, 0, 0, 0.1));
    border-radius: 8px;
    transition: all 0.2s ease;
}

.house-stat:hover {
    background: var(--pt-item-bg-hover, rgba(0, 0, 0, 0.15));
    transform: translateY(-1px);
}

.stat-label {
    font-size: 0.8em;
    color: var(--pt-text-muted, #999);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.1em;
    color: var(--pt-text, #fff);
    font-weight: 500;
}

.house-actions {
    text-align: center;
}

.house-link {
    display: inline-block;
    padding: 12px 24px;
    background: var(--pt-divider, rgba(255, 255, 255, 0.1));
    border-radius: 6px;
    color: var(--pt-text, #fff);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.house-link:hover {
    background: var(--pt-divider-strong, rgba(255, 255, 255, 0.15));
    transform: translateY(-1px);
}

.no-house {
    padding: 32px;
    text-align: center;
    background: var(--pt-item-bg, rgba(0, 0, 0, 0.1));
}

.no-house-message {
    color: var(--pt-text-muted, #999);
    margin-bottom: 16px;
    font-size: 1.1em;
}

/* Basic Info Widget */
.basic-info-container {
    padding: 24px;
}

.character-identity {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.character-name {
    font-size: 2em;
    font-weight: bold;
    color: var(--pt-text, #fff);
    text-align: left;
    margin-bottom: 0;
    text-shadow: var(--pt-text-shadow-strong, 0 2px 4px rgba(0, 0, 0, 0.3));
    letter-spacing: 1px;
}

.character-title {
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: var(--pt-text-shadow-strong, 0 1px 2px rgba(0, 0, 0, 0.35));
    line-height: 1.2;
}

.character-followers {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pt-text-dim, #666);
    letter-spacing: 0.3px;
}

.basic-info-actions {
    padding: 0 24px 8px;
}

.basic-info-actions .ps-form {
    margin-top: 0;
}

.basic-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.basic-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--pt-item-bg, rgba(0, 0, 0, 0.1));
    border-radius: 8px;
    transition: all 0.2s ease;
}

.basic-info-item:hover {
    background: var(--pt-item-bg-hover, rgba(0, 0, 0, 0.15));
    transform: translateY(-1px);
}

.basic-info-label {
    font-size: 0.8em;
    color: var(--pt-text-muted, #999);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.basic-info-value {
    font-size: 1.1em;
    color: var(--pt-text, #fff);
    font-weight: 500;
}

.status-offline {
    color: #ff4444 !important;
    font-weight: bold;
}

.status-online {
    color: #44ff44 !important;
    font-weight: bold;
}

.basic-info-value img {
    height: 16px;
    margin-right: 4px;
    vertical-align: middle;
}

/* Common styles for all widgets */
.profile-widget li {
    padding: 12px 24px;
    border-bottom: 1px solid var(--pt-divider-soft, rgba(255, 255, 255, 0.05));
    transition: all 0.2s ease;
}

.profile-widget li:hover {
    background: var(--pt-item-bg, rgba(0, 0, 0, 0.1));
}

.profile-widget a {
    color: var(--pt-link, #fff);
    text-decoration: none;
    transition: all 0.2s ease;
}

.profile-widget a:hover {
    color: var(--pt-link-hover, #fff);
    text-shadow: var(--pt-link-glow, 0 0 8px rgba(255, 255, 255, 0.5));
}

/* Player Bio Widget */
.bio-container {
    padding: 20px;
    background: var(--pt-item-bg, rgba(0, 0, 0, 0.1));
    border-radius: 8px;
}

.bio-content {
    color: var(--pt-text, #fff);
    line-height: 1.6;
    font-size: 1.1em;
}

.bio-content p {
    margin-bottom: 12px;
}

.bio-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 8px 0;
}

.bio-content a {
    color: var(--pt-link, #fff);
    text-decoration: underline;
    transition: all 0.2s ease;
}

.bio-content a:hover {
    color: var(--pt-link-hover, #fff);
    text-shadow: var(--pt-link-glow, 0 0 8px rgba(255, 255, 255, 0.5));
}

.no-bio {
    color: var(--pt-text-muted, #999);
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.bio-date {
    color: var(--pt-text-muted, #999);
    font-size: 0.9em;
    text-align: right;
    margin-top: 12px;
    font-style: italic;
}

/* Social Media Widget */
.social-media-container {
    padding: 20px;
}

.social-media-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    line-height: 0;
    text-decoration: none;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.social-btn:hover {
    transform: scale(1.08);
    opacity: 0.9;
    text-shadow: none;
}

.social-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    background: var(--pt-item-bg, rgba(0, 0, 0, 0.1));
    color: var(--pt-text, #fff);
    border: 1px solid var(--pt-divider, rgba(255, 255, 255, 0.1));
    cursor: default;
}

.social-chip-label {
    font-size: 0.95em;
    font-weight: bold;
    color: var(--pt-text, #fff);
}

.social-chip .social-icon {
    width: 36px;
    height: 36px;
}

.social-icon {
    width: 44px;
    height: 44px;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    box-shadow: var(--pt-shadow-soft, 0 1px 2px rgba(0, 0, 0, 0.04));
}

.no-social {
    color: var(--pt-text-muted, #999);
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Posts rendered inside a profile widget. Tokens stay on .profile-themed. */
.profile-widget .ps-post {
    background: var(--pt-widget-bg, #fff);
    color: var(--pt-text, #7A7A68);
    border-color: var(--pt-divider, #D9D5CF);
    box-shadow: var(--pt-shadow, 0 4px 6px rgba(0, 0, 0, 0.1));
}

.profile-widget .ps-post__head {
    background: var(--pt-widget-header-bg, #404040);
    color: var(--pt-text, #fff);
}

.profile-widget .ps-post__head a,
.profile-widget .ps-post__time,
.profile-widget .ps-post__kind {
    color: var(--pt-text, #fff);
}

.profile-widget .ps-post__body,
.profile-widget .ps-post__moment,
.profile-widget .ps-post__comment {
    color: var(--pt-text, #7A7A68);
    background: var(--pt-item-bg, transparent);
}

.profile-widget .ps-post__moment,
.profile-widget .ps-post__comment,
.profile-widget .ps-post__actions {
    border-color: var(--pt-divider, #D9D5CF);
}

.profile-widget .ps-post a {
    color: var(--pt-link, #009FBC);
}

.profile-widget .ps-post__head a {
    color: var(--pt-text, #fff);
} 