/* ===========================================
   Player Statistics Card - Styles
   Color Theme (matching Talent Discovery brand):
   - Primary: #00ff88 (green)
   - Secondary: #00ccff (cyan)
   - Dark: #0f0f23
   - Darker: #0a0a18
   - Accent: #ff3366 (red/pink)
   - Gold: #d4af37
   =========================================== */

/* CSS Variables */
:root {
    --primary: #00ff88;
    --secondary: #00ccff;
    --dark: #0f0f23;
    --darker: #0a0a18;
    --accent: #ff3366;
    --gold: #d4af37;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.4);
    --glow-color: rgba(0, 255, 136, 0.4);
    --border-color: rgba(0, 255, 136, 0.3);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--darker);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 50%, #16213e 100%);
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    color: var(--primary);
}

.loading-container .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Main Card Container */
.card-container {
    width: 100%;
    max-width: 1100px;
    perspective: 1000px;
}

/* Player Card */
.player-card {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    background: linear-gradient(145deg, var(--dark) 0%, var(--darker) 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 
        0 0 40px rgba(0, 255, 136, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

/* Glowing border effect */
.player-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), transparent, var(--primary));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.3;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Left Section - Player Image */
.player-image-section {
    position: relative;
    background: linear-gradient(180deg, #16213e 0%, var(--dark) 100%);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.back-button:hover {
    color: var(--text-primary);
    transform: translateX(-5px);
}

.back-button i {
    font-size: 14px;
}

.player-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.player-image {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    animation: playerFloat 4s ease-in-out infinite;
}

@keyframes playerFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Right Section - Player Info */
.player-info-section {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Player Header */
.player-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.player-name-wrapper {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.player-firstname {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.player-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 20px var(--glow-color);
    line-height: 1;
}

.player-lastname {
    font-size: 56px;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Player Details */
.player-details {
    display: flex;
    gap: 40px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: lowercase;
    letter-spacing: 1px;
}

.detail-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.8fr;
    gap: 30px;
    align-items: start;
}

/* Attribute Bars */
.attribute-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.attribute-bar {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.attribute-bar:hover .bar-fill {
    filter: brightness(1.3);
    box-shadow: 0 0 15px var(--glow-color);
}

.attribute-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--glow-color);
}

/* Circular Stats */
.circular-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.circular-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.circular-stat:hover {
    transform: scale(1.05);
}

.circular-stat:hover .progress-ring-fill {
    filter: drop-shadow(0 0 10px var(--primary));
}

.progress-ring {
    width: 100px;
    height: 100px;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 5px var(--glow-color));
}

.stat-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    display: flex;
    align-items: baseline;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-percent {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

.stat-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: lowercase;
    text-align: center;
}

/* Field Position */
.field-position {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mini-field {
    width: 80px;
    height: 120px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.field-lines {
    position: absolute;
    inset: 0;
}

.center-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
}

.penalty-box {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 20px;
    border: 1px solid var(--border-color);
}

.penalty-box.top {
    top: 0;
    border-top: none;
}

.penalty-box.bottom {
    bottom: 0;
    border-bottom: none;
}

.position-marker {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary), 0 0 20px var(--glow-color);
    animation: markerPulse 2s ease-in-out infinite;
}

@keyframes markerPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 10px var(--primary), 0 0 20px var(--glow-color);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        box-shadow: 0 0 15px var(--primary), 0 0 30px var(--glow-color);
    }
}

/* Goal Stats */
.goal-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.goal-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
    min-width: 70px;
}

.goal-stat:hover {
    background: rgba(0, 255, 136, 0.1);
}

.goal-stat:hover .goal-value {
    color: var(--primary);
    text-shadow: 0 0 15px var(--glow-color);
}

.goal-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.goal-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: lowercase;
}

/* ==========================================
   Additional Styles for Firebase Integration
   ========================================== */

/* Bar Value Display */
.attribute-bar {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.bar-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

/* Position Badge Container */
.position-badge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.position-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 20px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.position-badge i {
    font-size: 16px;
}

.age-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.age-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
}

.age-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: lowercase;
}

/* Contact Section */
.contact-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--darker);
    padding: 15px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--glow-color);
}

.contact-btn i {
    font-size: 16px;
}

/* Share Section */
.share-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-3px);
}

.share-btn.copied {
    border-color: var(--primary);
    color: var(--darker);
    background: var(--primary);
}

#shareWhatsApp:hover {
    border-color: #25D366;
    color: #25D366;
    background: rgba(37, 211, 102, 0.1);
}

#shareTwitter:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

#shareFacebook:hover {
    border-color: #1877F2;
    color: #1877F2;
    background: rgba(24, 119, 242, 0.1);
}

#shareLinkedIn:hover {
    border-color: #0A66C2;
    color: #0A66C2;
    background: rgba(10, 102, 194, 0.1);
}

/* Back button as link */
a.back-button {
    text-decoration: none;
}

/* ===========================================
   Bio Section Styles
   ========================================== */
.player-bio {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bio-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.bio-title i {
    font-size: 14px;
}

.bio-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    text-align: justify;
}

/* ==========================================
   Video Section Styles
   ========================================== */
.video-section {
    margin-top: 10px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* ==========================================
   Section Divider Styles
   ========================================== */
.section-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.divider-text {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* ==========================================
   Physical Attributes Styles
   ========================================== */
.physical-attributes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.physical-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.physical-stat:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.physical-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
    transition: all 0.3s ease;
}

.physical-stat:hover .physical-icon {
    color: var(--primary);
    transform: scale(1.1);
}

.physical-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.physical-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.physical-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
