/**
 * PokeGO Hub Pro v6.0 Frontend Styles
 * Dark theme optimized for gaming databases
 */

:root {
    --pghp-bg-dark: #1a1a2e;
    --pghp-bg-card: #16213e;
    --pghp-bg-lighter: #0f3460;
    --pghp-accent: #e94560;
    --pghp-accent-light: #ff6b6b;
    --pghp-text: #eee;
    --pghp-text-muted: #aaa;
    --pghp-border: #2a2a4a;
    --pghp-success: #4ade80;
    --pghp-warning: #fbbf24;
}

/* ========== TYPE COLORS ========== */
.pghp-type { display: inline-block; padding: 4px 12px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; color: #fff; text-shadow: 1px 1px 1px rgba(0,0,0,0.3); }
.pghp-type-normal { background: linear-gradient(135deg, #A8A878, #8a8a5c); }
.pghp-type-fire { background: linear-gradient(135deg, #F08030, #dd6610); }
.pghp-type-water { background: linear-gradient(135deg, #6890F0, #4a6fc9); }
.pghp-type-electric { background: linear-gradient(135deg, #F8D030, #c9a820); color: #333; }
.pghp-type-grass { background: linear-gradient(135deg, #78C850, #5ca935); }
.pghp-type-ice { background: linear-gradient(135deg, #98D8D8, #6bc5c5); color: #333; }
.pghp-type-fighting { background: linear-gradient(135deg, #C03028, #9c1f18); }
.pghp-type-poison { background: linear-gradient(135deg, #A040A0, #7c2d7c); }
.pghp-type-ground { background: linear-gradient(135deg, #E0C068, #c9a84d); color: #333; }
.pghp-type-flying { background: linear-gradient(135deg, #A890F0, #7a60d4); }
.pghp-type-psychic { background: linear-gradient(135deg, #F85888, #e52d65); }
.pghp-type-bug { background: linear-gradient(135deg, #A8B820, #8a9a10); }
.pghp-type-rock { background: linear-gradient(135deg, #B8A038, #9a8428); }
.pghp-type-ghost { background: linear-gradient(135deg, #705898, #5a4480); }
.pghp-type-dragon { background: linear-gradient(135deg, #7038F8, #5820d0); }
.pghp-type-dark { background: linear-gradient(135deg, #705848, #52403a); }
.pghp-type-steel { background: linear-gradient(135deg, #B8B8D0, #9898b8); color: #333; }
.pghp-type-fairy { background: linear-gradient(135deg, #EE99AC, #e06080); }

/* ========== POKEMON GRID ========== */
.pghp-pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.pghp-card {
    background: var(--pghp-bg-card);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--pghp-text);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    border: 1px solid var(--pghp-border);
}

.pghp-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(233, 69, 96, 0.2);
}

.pghp-card-image {
    background: linear-gradient(135deg, var(--pghp-bg-lighter), var(--pghp-bg-dark));
    padding: 20px;
    text-align: center;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pghp-card-image img {
    max-width: 100px;
    height: auto;
    transition: transform 0.3s;
}

.pghp-card:hover .pghp-card-image img {
    transform: scale(1.1);
}

.pghp-shiny-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    filter: drop-shadow(0 0 3px gold);
}

.pghp-card-info {
    padding: 15px;
}

.pghp-card-dex {
    font-size: 12px;
    color: var(--pghp-text-muted);
    font-family: monospace;
}

.pghp-card-info h4 {
    margin: 5px 0 10px;
    font-size: 16px;
    font-weight: 600;
}

.pghp-card-types {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.pghp-card-types .pghp-type {
    font-size: 10px;
    padding: 3px 8px;
}

.pghp-card-cp {
    font-size: 13px;
    color: var(--pghp-accent);
    font-weight: 600;
}

/* ========== SPRITE SHOWCASE ========== */
.pghp-sprites-showcase {
    background: var(--pghp-bg-card);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--pghp-border);
}

.pghp-sprite-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pghp-sprite-tab {
    background: var(--pghp-bg-lighter);
    border: none;
    color: var(--pghp-text);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.pghp-sprite-tab:hover,
.pghp-sprite-tab.active {
    background: var(--pghp-accent);
}

.pghp-sprite-panel {
    display: none;
}

.pghp-sprite-panel.active {
    display: block;
}

.pghp-sprite-pair {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.pghp-sprite-item {
    text-align: center;
    background: var(--pghp-bg-lighter);
    padding: 30px;
    border-radius: 12px;
    min-width: 180px;
}

.pghp-sprite-item img {
    max-width: 150px;
    height: auto;
    image-rendering: pixelated;
}

.pghp-sprite-item.animated img {
    width: 96px;
    height: 96px;
}

.pghp-sprite-item.artwork img,
.pghp-sprite-item.home img {
    max-width: 200px;
    image-rendering: auto;
}

.pghp-sprite-item.shiny {
    background: linear-gradient(135deg, #2a2a4a, #3d2d50);
    border: 2px solid gold;
}

.pghp-sprite-label {
    display: block;
    margin-top: 15px;
    font-size: 14px;
    color: var(--pghp-text-muted);
    font-weight: 500;
}

/* ========== STATS BARS ========== */
.pghp-stats-bars {
    background: var(--pghp-bg-card);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--pghp-border);
}

.pghp-stat-row {
    display: flex;
    align-items: center;
    margin: 12px 0;
    gap: 15px;
}

.pghp-stat-name {
    width: 80px;
    font-weight: 500;
    color: var(--pghp-text-muted);
}

.pghp-stat-bar {
    flex: 1;
    height: 12px;
    background: var(--pghp-bg-lighter);
    border-radius: 6px;
    overflow: hidden;
}

.pghp-stat-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.pghp-stat-fill.attack { background: linear-gradient(90deg, #ef4444, #f97316); }
.pghp-stat-fill.defense { background: linear-gradient(90deg, #3b82f6, #06b6d4); }
.pghp-stat-fill.stamina { background: linear-gradient(90deg, #22c55e, #84cc16); }
.pghp-stat-fill.total { background: linear-gradient(90deg, #8b5cf6, #ec4899); }

.pghp-stat-value {
    width: 50px;
    text-align: right;
    font-weight: 700;
    font-size: 16px;
    color: var(--pghp-text);
}

.pghp-stat-row.total {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--pghp-border);
}

/* ========== PVP RANKINGS ========== */
.pghp-pvp-rankings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.pghp-pvp-league {
    background: var(--pghp-bg-card);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--pghp-border);
    transition: transform 0.3s;
}

.pghp-pvp-league:hover {
    transform: scale(1.02);
}

.pghp-pvp-league.great { border-left: 4px solid #cd7f32; }
.pghp-pvp-league.ultra { border-left: 4px solid #c0c0c0; }
.pghp-pvp-league.master { border-left: 4px solid #ffd700; }

.pghp-pvp-icon {
    font-size: 36px;
}

.pghp-pvp-info {
    display: flex;
    flex-direction: column;
}

.pghp-pvp-name {
    font-size: 14px;
    color: var(--pghp-text-muted);
}

.pghp-pvp-rank {
    font-size: 22px;
    font-weight: 700;
    color: var(--pghp-text);
}

/* ========== WEAKNESSES ========== */
.pghp-weaknesses {
    background: var(--pghp-bg-card);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--pghp-border);
}

.pghp-weaknesses h4 {
    margin: 0 0 15px;
    color: var(--pghp-accent);
}

.pghp-weakness-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pghp-weakness-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--pghp-bg-lighter);
    padding: 8px 12px;
    border-radius: 8px;
}

.pghp-multiplier {
    font-weight: 700;
    color: var(--pghp-accent);
}

/* ========== MOVES ========== */
.pghp-moves-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.pghp-moves-column {
    background: var(--pghp-bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--pghp-border);
}

.pghp-moves-column h4 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pghp-border);
}

.pghp-moves-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pghp-moves-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--pghp-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pghp-moves-list li:last-child {
    border-bottom: none;
}

.pghp-moves-list li.elite {
    color: var(--pghp-warning);
}

.elite-tag {
    font-size: 10px;
    background: var(--pghp-warning);
    color: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

/* ========== CP CHART ========== */
.pghp-cp-chart {
    background: var(--pghp-bg-card);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
    border: 1px solid var(--pghp-border);
}

.pghp-cp-chart table {
    width: 100%;
    border-collapse: collapse;
}

.pghp-cp-chart th {
    background: var(--pghp-bg-lighter);
    padding: 12px 8px;
    text-align: center;
    color: var(--pghp-accent);
    font-size: 12px;
}

.pghp-cp-chart td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid var(--pghp-border);
    font-size: 13px;
}

.pghp-cp-chart td:nth-child(odd) {
    color: var(--pghp-text-muted);
    font-family: monospace;
}

.pghp-cp-chart td:nth-child(even) {
    color: var(--pghp-text);
    font-weight: 500;
}

.pghp-cp-chart tr:hover td {
    background: var(--pghp-bg-lighter);
}

/* ========== EVOLUTION ========== */
.pghp-evolution-chain {
    background: var(--pghp-bg-card);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--pghp-border);
}

.pghp-evolution-text {
    color: var(--pghp-text-muted);
    margin-bottom: 10px;
    display: block;
}

.pghp-evolution-target {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

.pghp-evolution-name {
    font-weight: 600;
    font-size: 18px;
}

.pghp-evolution-cost {
    background: var(--pghp-bg-lighter);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* ========== INFO GRID ========== */
.pghp-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.pghp-info-item {
    background: var(--pghp-bg-card);
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--pghp-border);
}

.pghp-info-item .label {
    color: var(--pghp-text-muted);
    font-size: 13px;
}

.pghp-info-item .value {
    font-weight: 600;
    color: var(--pghp-text);
}

/* ========== TYPE GRID ========== */
.pghp-type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.pghp-type-grid .pghp-type {
    padding: 10px 20px;
    font-size: 13px;
}

.pghp-type-grid a.pghp-type {
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pghp-type-grid a.pghp-type:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* ========== SEARCH ========== */
.pghp-search {
    display: flex;
    max-width: 500px;
    margin: 20px 0;
}

.pghp-search input[type="text"] {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--pghp-border);
    border-radius: 8px 0 0 8px;
    background: var(--pghp-bg-card);
    color: var(--pghp-text);
    font-size: 16px;
}

.pghp-search input[type="text"]:focus {
    outline: none;
    border-color: var(--pghp-accent);
}

.pghp-search button {
    padding: 12px 25px;
    background: var(--pghp-accent);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.pghp-search button:hover {
    background: var(--pghp-accent-light);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .pghp-pokemon-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .pghp-sprite-pair {
        gap: 20px;
    }
    
    .pghp-sprite-item {
        padding: 20px;
        min-width: 140px;
    }
    
    .pghp-pvp-rankings {
        grid-template-columns: 1fr;
    }
    
    .pghp-stat-name {
        width: 60px;
        font-size: 12px;
    }
}
