/* ========================================
   PCTL Player Card - FUT Style
   ======================================== */

/* Card Icon neben Spielernamen */
.player-card-icon {
    cursor: pointer;
    margin-left: 8px;
    padding: 4px 6px;
    color: #6c757d;
    font-size: 14px;
    transition: all 0.2s ease;
    vertical-align: middle;
    display: inline-block;
    border-radius: 4px;
    background: rgba(108, 117, 125, 0.05);
}

.player-card-icon:hover {
    color: #d4af37;
    transform: scale(1.15);
    background: rgba(212, 175, 55, 0.15);
}

/* Größerer Touch-Target auf Mobile */
@media (max-width: 768px) {
    .player-card-icon {
        padding: 6px 10px;
        font-size: 16px;
        margin-left: 10px;
    }
}

/* Die Card selbst */
.pctl-player-card {
    position: absolute;
    z-index: 10000;
    width: 220px;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(212, 175, 55, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    pointer-events: none;
    display: none;
}

/* Gold-Akzent oben */
.pctl-player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #f4d03f, #d4af37);
}

/* Header mit Rating und Position */
.pctl-card-header {
    display: flex;
    padding: 12px 12px 8px 12px;
    gap: 10px;
}

.pctl-card-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px;
}

.pctl-card-rating-value {
    font-size: 32px;
    font-weight: 700;
    color: #f4d03f;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pctl-card-position {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgba(212, 175, 55, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 4px;
}

.pctl-card-player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.pctl-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.pctl-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #adb5bd;
}

.pctl-card-meta img {
    height: 14px;
    width: auto;
    vertical-align: middle;
}

.pctl-card-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Spielerbild Bereich */
.pctl-card-image {
    display: flex;
    justify-content: center;
    padding: 0 12px 8px 12px;
    position: relative;
}

.pctl-card-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.5);
    background: rgba(0, 0, 0, 0.2);
}

/* Marktwert Badge */
.pctl-card-marktwert {
    position: absolute;
    bottom: 5px;
    right: 12px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Attribute Grid */
.pctl-card-attributes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pctl-card-attr {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px;
}

.pctl-card-attr-value {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.pctl-card-attr-label {
    font-size: 9px;
    font-weight: 600;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Attribut-Farben basierend auf Wert */
.pctl-card-attr-value.attr-low { color: #dc3545; }
.pctl-card-attr-value.attr-medium { color: #ffc107; }
.pctl-card-attr-value.attr-good { color: #8bc34a; }
.pctl-card-attr-value.attr-excellent { color: #28a745; }

/* Footer mit Zusatzinfos */
.pctl-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 10px;
    color: #adb5bd;
}

.pctl-card-footer-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pctl-card-footer-item i {
    color: #d4af37;
}

.pctl-card-potenzial {
    background: rgba(212, 175, 55, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    color: #f4d03f;
    font-weight: 600;
}

/* Positionen Tags */
.pctl-card-positions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 12px 8px 12px;
    justify-content: center;
}

.pctl-card-pos-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.pctl-card-pos-tag.pos-main {
    background: rgba(212, 175, 55, 0.4);
    color: #f4d03f;
}

/* Sterne für Schwacher Fuß / Skillmoves */
.pctl-card-stars {
    color: #f4d03f;
    font-size: 10px;
    letter-spacing: 1px;
}

/* Loading State */
.pctl-player-card.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.pctl-player-card.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Dark Mode Anpassungen
   ======================================== */
html[data-user-theme='dark'] .pctl-player-card {
    background: linear-gradient(145deg, #0d0d1a 0%, #1a1a2e 50%, #16213e 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 
                0 0 0 1px rgba(212, 175, 55, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ========================================
   Light Mode Variante
   ======================================== */
html[data-user-theme='light'] .pctl-player-card {
    background: linear-gradient(145deg, #1e3a5f 0%, #2d5a87 50%, #3d7ab5 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 
                0 0 0 1px rgba(212, 175, 55, 0.4);
}

html[data-user-theme='light'] .pctl-card-rating-value {
    color: #f4d03f;
}

html[data-user-theme='light'] .pctl-card-name {
    color: #fff;
}

html[data-user-theme='light'] .pctl-card-meta {
    color: #d0d0d0;
}

html[data-user-theme='light'] .pctl-card-attr-label {
    color: #b0b0b0;
}

html[data-user-theme='light'] .pctl-card-footer {
    color: #d0d0d0;
    background: rgba(0, 0, 0, 0.2);
}

html[data-user-theme='light'] .pctl-card-attributes {
    background: rgba(0, 0, 0, 0.15);
}

html[data-user-theme='light'] .pctl-card-pos-tag {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

html[data-user-theme='light'] .pctl-card-pos-tag.pos-main {
    background: rgba(212, 175, 55, 0.5);
    color: #fff;
}

/* ========================================
   Mobile Anpassungen
   ======================================== */
@media (max-width: 768px) {
    .pctl-player-card {
        width: 200px;
    }
    
    .pctl-card-rating-value {
        font-size: 28px;
    }
    
    .pctl-card-name {
        font-size: 13px;
    }
    
    .pctl-card-image img {
        width: 70px;
        height: 70px;
    }
}
