/* Player Profile Layout CSS - Mobile First Responsive Design */
/* PPL Virtual Plugin Styles */

.ppl-virtual-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Arial', sans-serif;
    background: #f5f5f5;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Color Scheme Variations */
.ppl-virtual-container[data-color-scheme="dark"] {
    background: #2a2a2a;
    color: #fff;
}

.ppl-virtual-container[data-color-scheme="light"] {
    background: #ffffff;
    color: #333;
}

/* Player Profile Card Styles */
.ppl-virtual-profile-card {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 15px;
    padding: 20px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.ppl-virtual-profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.1), rgba(255, 255, 255, 0.05));
    pointer-events: none;
}

.ppl-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.ppl-overall-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.ppl-rating-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.ppl-position {
    font-size: 0.9em;
    font-weight: bold;
    margin-top: 5px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ppl-player-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    position: relative;
    z-index: 2;
}

.ppl-player-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ppl-player-image:hover img {
    transform: scale(1.05);
}

.ppl-player-name {
    font-size: 1.8em;
    font-weight: bold;
    margin: 15px 0 10px 0;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.ppl-stats-mini {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    position: relative;
    z-index: 2;
}

.ppl-stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    min-width: 50px;
    transition: all 0.3s ease;
}

.ppl-stat-mini:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.ppl-stat-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffd700;
}

.ppl-stat-label {
    font-size: 0.8em;
    margin-top: 5px;
    color: #ccc;
    font-weight: 500;
}

/* Attributes Section */
.ppl-virtual-attributes {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ppl-virtual-container[data-color-scheme="dark"] .ppl-virtual-attributes {
    background: #3a3a3a;
    color: #fff;
}

.ppl-attributes-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.ppl-virtual-container[data-color-scheme="dark"] .ppl-attributes-title {
    color: #fff;
    border-bottom-color: #555;
}

.ppl-attributes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.ppl-attribute-item {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 2px solid #eee;
    position: relative;
    overflow: hidden;
}

.ppl-virtual-container[data-color-scheme="dark"] .ppl-attribute-item {
    background: #4a4a4a;
    border-color: #555;
}

.ppl-attribute-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.ppl-attribute-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ppl-attribute-item:hover::before {
    left: 100%;
}

.ppl-attribute-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.ppl-attribute-label {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.ppl-virtual-container[data-color-scheme="dark"] .ppl-attribute-label {
    color: #fff;
}

.ppl-attribute-value {
    font-size: 1.3em;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 20px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    min-width: 40px;
    text-align: center;
}

/* Progress Bar */
.ppl-progress-container {
    margin: 15px 0 10px 0;
}

.ppl-progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.ppl-progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s ease-in-out;
    position: relative;
    width: 0%; /* Start empty for animation */
}

.ppl-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: ppl-shimmer 2s infinite;
}

@keyframes ppl-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Arc Visualization */
.ppl-attribute-arc {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.ppl-arc-svg {
    width: 80px;
    height: 40px;
}

.ppl-arc-bg {
    stroke: #e0e0e0;
    stroke-width: 4;
    fill: none;
}

.ppl-arc-fill {
    stroke-width: 4;
    fill: none;
    transition: all 0.8s ease-in-out;
    stroke-linecap: round;
    /* Start empty for animation */
    stroke-dasharray: 0 94.2;
}

.ppl-arc-text {
    position: absolute;
    bottom: 0px;
    font-size: 0.8em;
    font-weight: bold;
    color: #666;
}

.ppl-virtual-container[data-color-scheme="dark"] .ppl-arc-text {
    color: #ccc;
}

/* Fixed Color Classes - Proper FIFA Colors */
.ppl-rating-red {
    background: linear-gradient(135deg, #e53e3e, #c53030);
}

.ppl-rating-yellow {
    background: linear-gradient(135deg, #ffd700, #ecc94b);
}

.ppl-rating-green {
    background: linear-gradient(135deg, #38a169, #2f855a);
}

.ppl-arc-fill.ppl-rating-red {
    stroke: #e53e3e;
}

.ppl-arc-fill.ppl-rating-yellow {
    stroke: #ffd700;
}

.ppl-arc-fill.ppl-rating-green {
    stroke: #38a169;
}

.ppl-progress-fill.ppl-rating-red {
    background: linear-gradient(90deg, #e53e3e, #c53030);
}

.ppl-progress-fill.ppl-rating-yellow {
    background: linear-gradient(90deg, #ffd700, #ecc94b);
}

.ppl-progress-fill.ppl-rating-green {
    background: linear-gradient(90deg, #38a169, #2f855a);
}

/* Animation Classes */
.ppl-animate-bounce {
    animation: ppl-bounceIn 0.6s ease-out;
}

.ppl-animate-scale {
    animation: ppl-scaleIn 0.5s ease-out;
}

.ppl-pulse {
    animation: ppl-pulse 1.5s infinite;
}

.ppl-glow {
    filter: drop-shadow(0 0 8px currentColor);
}

.ppl-clicked {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

@keyframes ppl-bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ppl-scaleIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ppl-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Loading skeleton animation */
.ppl-loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: ppl-loading 1.5s infinite;
}

@keyframes ppl-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Loaded state for smooth transitions */
.ppl-virtual-container.ppl-loaded .ppl-progress-fill {
    transition: width 1s ease-out;
}

.ppl-virtual-container.ppl-loaded .ppl-arc-fill {
    transition: stroke-dasharray 1.2s ease-out;
}

/* Tablet Styles */
@media (min-width: 768px) {
    .ppl-virtual-container {
        padding: 30px;
    }
    
    .ppl-attributes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .ppl-virtual-profile-card {
        margin-bottom: 30px;
    }
    
    .ppl-card-header {
        justify-content: space-around;
    }
    
    .ppl-player-image {
        width: 150px;
        height: 150px;
    }
    
    .ppl-rating-number {
        font-size: 3em;
    }
    
    .ppl-arc-svg {
        width: 100px;
        height: 50px;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .ppl-virtual-container {
        display: grid;
        grid-template-columns: 350px 1fr;
        gap: 40px;
        align-items: start;
    }
    
    .ppl-attributes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .ppl-virtual-profile-card {
        margin-bottom: 0;
        height: fit-content;
        position: sticky;
        top: 20px;
    }
    
    .ppl-card-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .ppl-player-image {
        width: 180px;
        height: 180px;
    }
    
    .ppl-rating-number {
        font-size: 3.5em;
    }
    
    .ppl-overall-rating {
        margin-bottom: 20px;
        padding: 20px;
    }
    
    .ppl-stats-mini {
        justify-content: space-between;
        gap: 10px;
    }
    
    .ppl-stat-mini {
        padding: 15px 10px;
        flex: 1;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .ppl-attributes-grid {
        gap: 35px;
    }
    
    .ppl-attribute-item {
        padding: 25px;
    }
    
    .ppl-arc-svg {
        width: 120px;
        height: 60px;
    }
    
    .ppl-virtual-container {
        grid-template-columns: 380px 1fr;
        gap: 50px;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .ppl-virtual-container *,
    .ppl-virtual-container *::before,
    .ppl-virtual-container *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .ppl-progress-fill {
        width: auto !important;
    }
    
    .ppl-arc-fill {
        stroke-dasharray: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ppl-virtual-container {
        border: 2px solid;
    }
    
    .ppl-attribute-item {
        border-width: 3px;
    }
    
    .ppl-progress-bar {
        border: 1px solid;
    }
}

/* Print styles */
@media print {
    .ppl-virtual-container {
        box-shadow: none;
        background: white !important;
        color: black !important;
    }
    
    .ppl-virtual-profile-card {
        background: #f0f0f0 !important;
        color: black !important;
        box-shadow: none;
    }
    
    .ppl-virtual-profile-card::before {
        display: none;
    }
    
    .ppl-attribute-item {
        break-inside: avoid;
    }
    
    .ppl-progress-fill {
        width: auto !important;
    }
    
    .ppl-arc-fill {
        stroke-dasharray: auto !important;
    }
}