/* wp-plugin/frontend.css — dark theme matching partidoshoy.futbol */
:root {
    --ph-bg-card: rgba(15, 28, 41, 0.88);
    --ph-border-card: rgba(196, 214, 228, 0.12);
    --ph-shadow-card: 0 20px 50px rgba(0, 0, 0, 0.28);
    --ph-text-main: #f5f8fb;
    --ph-text-muted: #a8b6c4;
    --ph-text-light: #728294;

    --ph-color-home: #22c957;
    --ph-color-draw: #f4c34d;
    --ph-color-away: #f05252;
    --ph-color-home-bg: rgba(34, 201, 87, 0.10);
    --ph-color-draw-bg: rgba(244, 195, 77, 0.10);
    --ph-color-away-bg: rgba(240, 82, 82, 0.10);

    --ph-font: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ph-radius-card: 16px;
}

.ph-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 28px 0;
}

@media (min-width: 640px) {
    .ph-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .ph-grid { grid-template-columns: repeat(3, 1fr); }
}

.ph-card,
.ph-single-card {
    background: var(--ph-bg-card);
    border: 1px solid var(--ph-border-card);
    border-radius: var(--ph-radius-card);
    box-shadow: var(--ph-shadow-card);
    color: var(--ph-text-main);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    font-family: var(--ph-font);
    backdrop-filter: blur(4px);
}

.ph-card:hover,
.ph-single-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.ph-single-card {
    max-width: 460px;
    margin: 28px auto;
}

.ph-card-banner {
    background: #132231;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 0.78rem;
    color: #a8b6c4;
    font-weight: 500;
    letter-spacing: 0.03em;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(196, 214, 228, 0.08);
}

.ph-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 20px 16px;
    gap: 0;
}

.ph-team {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    color: #f5f8fb;
}

.ph-team.ph-home { text-align: right; padding-right: 8px; }
.ph-team.ph-away { text-align: left; padding-left: 8px; }

.ph-vs {
    margin: 0 10px;
    font-size: 0.72rem;
    color: var(--ph-text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    flex: 0 0 auto;
}

.ph-card-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 20px 20px;
}

.ph-bar-container {
    height: 34px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.ph-bar {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 8px;
    letter-spacing: 0.02em;
    gap: 6px;
    min-width: 40px;
    justify-content: flex-start;
}

.ph-bar-home  { background: linear-gradient(90deg, #16a848, #22c957); }
.ph-bar-draw  { background: linear-gradient(90deg, #d9a128, #f4c34d); }
.ph-bar-away  { background: linear-gradient(90deg, #d03131, #f05252); }

.ph-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--ph-text-muted);
    border-top: 1px solid rgba(196, 214, 228, 0.1);
    padding: 10px 20px;
    letter-spacing: 0.01em;
}

.ph-xg { font-weight: 600; color: var(--ph-text-main); }

.ph-footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ph-value-badge {
    display: flex;
    align-items: center;
}

.ph-value-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.ph-value-over {
    background: rgba(34, 201, 87, 0.15);
    color: #22c957;
    border: 1px solid rgba(34, 201, 87, 0.3);
}

.ph-value-under {
    background: rgba(240, 82, 82, 0.12);
    color: #f05252;
    border: 1px solid rgba(240, 82, 82, 0.25);
}

.ph-news-accordion {
    border-top: 1px solid rgba(196, 214, 228, 0.1);
    margin-top: 0;
}

.ph-news-accordion summary {
    list-style: none;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--ph-text-muted);
    outline: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.03em;
    padding: 14px 20px;
    transition: color 0.2s ease;
}

.ph-news-accordion summary:hover { color: var(--ph-text-main); }

.ph-news-accordion summary::after {
    content: '\25BE';
    margin-left: auto;
    transition: transform 0.2s ease;
    font-size: 0.85rem;
    color: var(--ph-text-light);
}

.ph-news-accordion[open] summary::after { transform: rotate(-180deg); }

.ph-news-content {
    padding: 0 20px 18px;
    animation: ph-fadeIn 0.25s ease;
}

.ph-news-text {
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--ph-text-main);
    border-left: 3px solid #22c957;
    padding-left: 12px;
    margin: 0 0 14px;
}

.ph-news-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ph-source-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(72, 167, 255, 0.08);
    border: 1px solid rgba(72, 167, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    color: #48a7ff;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.ph-source-chip::before { content: '\1F517'; font-size: 0.68rem; }

.ph-source-chip:hover {
    background: rgba(72, 167, 255, 0.16);
    border-color: rgba(72, 167, 255, 0.4);
    transform: translateY(-1px);
}

.ph-footer-info {
    text-align: center;
    font-size: 0.78rem;
    color: var(--ph-text-light);
    margin-top: 28px;
    letter-spacing: 0.02em;
}

@keyframes ph-fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ph-search-container {
    margin: 20px 0;
}

.ph-search-form {
    display: flex;
    gap: 8px;
    max-width: 400px;
}

.ph-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(196, 214, 228, 0.15);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--ph-font);
    background: rgba(15, 28, 41, 0.88);
    color: #f5f8fb;
    outline: none;
    transition: border-color 0.2s ease;
}

.ph-search-input::placeholder {
    color: #728294;
}

.ph-search-input:focus {
    border-color: #22c957;
}

.ph-search-btn {
    padding: 10px 18px;
    background: #22c957;
    color: #061017;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--ph-font);
    transition: opacity 0.2s ease;
}

.ph-search-btn:hover {
    opacity: 0.85;
}

.ph-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 28px 0;
}

.ph-page-info {
    font-size: 0.82rem;
    color: var(--ph-text-muted);
}

.ph-page-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.ph-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(196, 214, 228, 0.12);
    border-radius: 8px;
    background: rgba(15, 28, 41, 0.88);
    color: #f5f8fb;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--ph-font);
    text-decoration: none;
    transition: all 0.2s ease;
}

.ph-page-link:hover {
    border-color: #22c957;
    color: #22c957;
}

.ph-page-active {
    background: #22c957;
    border-color: #22c957;
    color: #061017;
}

.ph-page-active:hover {
    color: #061017;
}

.ph-share {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.ph-share-btn {
    background: none;
    border: 1px solid rgba(196, 214, 228, 0.15);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ph-text-muted);
    cursor: pointer;
    font-family: var(--ph-font);
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.ph-share-btn:hover {
    border-color: #22c957;
    color: #22c957;
}

.ph-share-fallback {
    display: none;
    gap: 4px;
}

.ph-share-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    letter-spacing: 0.01em;
    font-family: var(--ph-font);
    transition: all 0.2s ease;
}

.ph-share-wa {
    background: #25d366;
    color: #fff;
}
.ph-share-wa:hover { opacity: 0.85; }

.ph-share-x {
    background: #000;
    color: #fff;
}
.ph-share-x:hover { opacity: 0.8; }

.ph-share-copy {
    background: rgba(255, 255, 255, 0.08);
    color: #f5f8fb;
}
.ph-share-copy:hover { background: rgba(255, 255, 255, 0.14); }

.ph-historical-accordion {
    border-top: 1px solid rgba(196, 214, 228, 0.1);
    margin-top: 0;
}

.ph-historical-accordion summary {
    list-style: none;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--ph-text-muted);
    outline: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.03em;
    padding: 14px 20px;
    transition: color 0.2s ease;
}

.ph-historical-accordion summary:hover {
    color: var(--ph-text-main);
}

.ph-historical-accordion summary::after {
    content: '\25BE';
    margin-left: auto;
    transition: transform 0.2s ease;
    font-size: 0.85rem;
    color: var(--ph-text-light);
}

.ph-historical-accordion[open] summary::after {
    transform: rotate(-180deg);
}

.ph-historical-content {
    padding: 0 20px 18px;
    animation: ph-fadeIn 0.25s ease;
}

.ph-historical-loading {
    font-size: 0.82rem;
    color: var(--ph-text-muted);
    font-style: italic;
}

.ph-historical-lines {
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--ph-text-main);
    letter-spacing: 0.01em;
}

.ph-result-badge {
    display: inline-block;
    background: rgba(34, 201, 87, 0.15);
    color: #22c957;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.ph-score-display {
    font-size: 1.3rem;
    font-weight: 800;
    color: #f5f8fb;
    margin: 0 12px;
    letter-spacing: 0.05em;
}

.ph-accuracy-bar {
    text-align: center;
    padding: 10px 16px;
    margin-bottom: 16px;
    background: rgba(34, 201, 87, 0.08);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f5f8fb;
    border: 1px solid rgba(34, 201, 87, 0.15);
}

.ph-comparison-accordion {
    border-top: 1px solid rgba(196, 214, 228, 0.1);
    margin-top: 0;
}

.ph-comparison-accordion summary {
    list-style: none;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--ph-text-muted);
    outline: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.03em;
    padding: 14px 20px;
    transition: color 0.2s ease;
}

.ph-comparison-accordion summary:hover {
    color: var(--ph-text-main);
}

.ph-comparison-accordion summary::after {
    content: '\25BE';
    margin-left: auto;
    transition: transform 0.2s ease;
    font-size: 0.85rem;
    color: var(--ph-text-light);
}

.ph-comparison-accordion[open] summary::after {
    transform: rotate(-180deg);
}

.ph-comparison-content {
    padding: 12px 16px;
    font-size: 0.85rem;
    line-height: 1.7;
}

.ph-comparison-prediction {
    margin-bottom: 8px;
}

.ph-comparison-prediction strong,
.ph-comparison-result strong {
    display: inline-block;
    margin-right: 6px;
    color: #a8b6c4;
}

.ph-comp-item {
    padding: 2px 6px;
    border-radius: 3px;
}

.ph-comp-actual {
    background: rgba(244, 195, 77, 0.12);
    font-weight: 700;
    border-bottom: 2px solid #f4c34d;
}

.ph-comp-sep {
    color: #4a5a6a;
    margin: 0 4px;
}

.ph-comp-correct {
    color: #22c957;
    font-weight: 700;
}

.ph-comp-wrong {
    color: #f05252;
    font-weight: 700;
}

.ph-comp-uncertain {
    color: #728294;
    font-style: italic;
}

@media (max-width: 600px) {
    .ph-score-display {
        font-size: 1.1rem;
        margin: 0 8px;
    }
}
