/* =========================================
   HyperCube - Postavy (Players) Page
   ========================================= */

.postavy-hero {
    margin-top: 120px;
    padding: 40px 0;
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    text-align: center;
    position: relative;
}

.postavy-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    color: var(--gold);
    text-shadow: 0 2px 20px rgba(212, 164, 76, 0.4);
    margin-bottom: 8px;
}

.postavy-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Search section */
.postavy-search-section {
    padding: 40px 0 20px;
}

.postavy-search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.postavy-search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 1.1rem;
    pointer-events: none;
}

.postavy-search-input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: var(--text-light);
    font-size: 1.05rem;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s ease;
}

.postavy-search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(212, 164, 76, 0.1), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.postavy-search-input::placeholder {
    color: var(--text-dim);
}

/* Search results grid */
.postavy-results {
    padding: 20px 0 60px;
    min-height: 200px;
}

.postavy-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.player-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.player-card:hover {
    border-color: rgba(212, 164, 76, 0.4);
    background: rgba(212, 164, 76, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.player-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.player-card:hover .player-card-avatar {
    border-color: rgba(212, 164, 76, 0.3);
}

.player-card-info {
    min-width: 0;
    flex: 1;
}

.player-card-name {
    font-weight: 700;
    color: var(--text-light);
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.player-card-badge.premium {
    background: rgba(212, 164, 76, 0.15);
    color: var(--gold);
}

.player-card-badge.warez {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
}

.player-card-arrow {
    color: var(--text-dim);
    transition: all 0.2s;
    flex-shrink: 0;
}

.player-card:hover .player-card-arrow {
    color: var(--gold);
    transform: translateX(3px);
}

/* Pagination */
.postavy-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.postavy-pagination button {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Lato', sans-serif;
    transition: all 0.2s;
}

.postavy-pagination button:hover:not(:disabled) {
    background: rgba(212, 164, 76, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

.postavy-pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.postavy-pagination .page-info {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Empty / loading states */
.postavy-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.postavy-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.postavy-empty p {
    font-size: 1rem;
}

.postavy-loading {
    text-align: center;
    padding: 60px 20px;
}

.postavy-loading i {
    font-size: 2rem;
    color: var(--gold);
}

/* ========================
   Player Profile View
   ======================== */

.profile-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 20px;
    background: none;
    border: none;
    font-family: 'Lato', sans-serif;
    transition: color 0.2s;
}

.profile-back:hover {
    color: var(--gold);
}

/* Profile Layout - 3 Column */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

/* Center column - Player render */
.profile-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
}

.profile-skin-render {
    width: 200px;
    height: 400px;
    position: relative;
}

.profile-skin-render img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.profile-skin-render:hover img {
    transform: scale(1.02);
}

.profile-username {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--gold);
    margin: 20px 0 8px 0;
    text-align: center;
    text-shadow: 0 2px 15px rgba(212, 164, 76, 0.3);
}

.profile-rank {
    font-size: 1rem;
    padding: 6px 16px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 12px;
    text-align: center;
}

.profile-meta-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 12px;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.profile-badge.premium {
    background: rgba(212, 164, 76, 0.15);
    color: var(--gold);
}

.profile-badge.warez {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
}

.profile-badge.server {
    background: rgba(59, 158, 255, 0.15);
    color: var(--accent-blue);
}

.profile-meta-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

.profile-meta-info i {
    margin-right: 6px;
    color: var(--text-dim);
}

/* Side columns - Stat cards */
.profile-stats-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Stat Card Base */
.stat-card {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-value {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--text-light);
    font-weight: 600;
    line-height: 1.2;
}

.stat-card-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 4px;
}

/* RPG Level Card - Purple/Magical */
.stat-card.rpg-level::before {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.stat-card.rpg-level .stat-card-icon {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.stat-card.rpg-level .stat-card-value {
    color: #a78bfa;
}

/* Class Card - Cyan/Teal */
.stat-card.class::before {
    background: linear-gradient(90deg, #14b8a6, #2dd4bf);
}

.stat-card.class .stat-card-icon {
    background: rgba(20, 184, 166, 0.15);
    color: #2dd4bf;
}

.stat-card.class .stat-card-value {
    color: #2dd4bf;
    font-size: 1.4rem;
}

/* Prestige Card - Gold/Premium */
.stat-card.prestige::before {
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.stat-card.prestige .stat-card-icon {
    background: rgba(212, 164, 76, 0.15);
    color: var(--gold);
}

.stat-card.prestige .stat-card-value {
    color: var(--gold);
    font-size: 2.2rem;
}

/* Bank Balance Card - Green/Money */
.stat-card.balance::before {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.stat-card.balance .stat-card-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.stat-card.balance .stat-card-value {
    color: #4ade80;
}

/* Rank Card - Red/Authority */
.stat-card.rank::before {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.stat-card.rank .stat-card-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.stat-card.rank .stat-card-value {
    font-size: 1.4rem;
}

/* Skill Average Card - Blue/Intelligence */
.stat-card.skills::before {
    background: linear-gradient(90deg, #3b9eff, #6bb8ff);
}

.stat-card.skills .stat-card-icon {
    background: rgba(59, 158, 255, 0.15);
    color: #6bb8ff;
}

.stat-card.skills .stat-card-value {
    color: #6bb8ff;
}

/* Playtime Card - Orange/Time */
.stat-card.playtime::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.stat-card.playtime .stat-card-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.stat-card.playtime .stat-card-value {
    color: #fbbf24;
    font-size: 1.4rem;
}

/* Votes Card - Pink/Community */
.stat-card.votes::before {
    background: linear-gradient(90deg, #ec4899, #f472b6);
}

.stat-card.votes .stat-card-icon {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
}

.stat-card.votes .stat-card-value {
    color: #f472b6;
}

/* No data state */
.profile-no-data {
    grid-column: 1 / -1;
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 48px 20px;
    text-align: center;
    color: var(--text-dim);
}

.profile-no-data i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.3;
}

.profile-no-data p {
    font-size: 0.95rem;
}

/* Minecraft color codes */
.mc-0 { color: #000000; }
.mc-1 { color: #0000AA; }
.mc-2 { color: #00AA00; }
.mc-3 { color: #00AAAA; }
.mc-4 { color: #AA0000; }
.mc-5 { color: #AA00AA; }
.mc-6 { color: #FFAA00; }
.mc-7 { color: #AAAAAA; }
.mc-8 { color: #555555; }
.mc-9 { color: #5555FF; }
.mc-a { color: #55FF55; }
.mc-b { color: #55FFFF; }
.mc-c { color: #FF5555; }
.mc-d { color: #FF55FF; }
.mc-e { color: #FFFF55; }
.mc-f { color: #FFFFFF; }
.mc-l { font-weight: bold; }
.mc-o { font-style: italic; }
.mc-n { text-decoration: underline; }
.mc-m { text-decoration: line-through; }

/* Responsive */
@media (max-width: 1024px) {
    .profile-layout {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .profile-center {
        grid-column: 1 / -1;
        order: -1;
    }

    .profile-skin-render {
        width: 160px;
        height: 320px;
    }
}

@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-stats-column {
        width: 100%;
    }

    .profile-username {
        font-size: 1.5rem;
    }

    .postavy-results-grid {
        grid-template-columns: 1fr;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }

    .stat-card.playtime .stat-card-value {
        font-size: 1.2rem;
    }
}
