/* ==================== FUTBIN SEARCH - MAIN STYLES ==================== */

/* Container Principal */
.futbin-search-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* Form de Busca */
.futbin-search-form {
    position: relative;
    margin-bottom: 20px;
}

.futbin-search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.futbin-search-input:focus {
    border-color: #2196F3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

.futbin-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}

/* Loading Spinner */
.futbin-search-loading {
    text-align: center;
    padding: 40px 20px;
}

.futbin-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2196F3;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Container */
.futbin-search-results {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-height: 500px;
    overflow-y: auto;
    margin-top: 10px;
}

.futbin-search-results::-webkit-scrollbar {
    width: 8px;
}

.futbin-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.futbin-search-results::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.futbin-search-results::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Result Item */
.futbin-result-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.futbin-result-item:last-child {
    border-bottom: none;
}

.futbin-result-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.futbin-result-player-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.futbin-result-info {
    flex: 1;
}

.futbin-result-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.futbin-result-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.futbin-result-rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 6px;
    min-width: 40px;
}

.futbin-result-position {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.futbin-result-version {
    color: #888;
    font-style: italic;
}

/* Empty State */
.futbin-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.futbin-no-results svg {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.futbin-error-message {
    text-align: center;
    padding: 20px;
    color: #d32f2f;
    background: #ffebee;
    border-radius: 8px;
    margin: 10px 0;
}

/* ==================== PLAYER PAGE STYLES ==================== */

.futbin-player-page {
    background: #f5f5f5;
}

.futbin-player-wrapper {
    min-height: 100vh;
    padding: 20px;
}

.futbin-player-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Header */
.futbin-player-header {
    margin-bottom: 30px;
}

.futbin-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2196F3;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.futbin-back-button:hover {
    gap: 12px;
    color: #1976D2;
}

.futbin-player-header h1 {
    font-size: 32px;
    color: #333;
    margin: 0;
    font-weight: 700;
}

/* Player Card */
.futbin-player-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    color: white;
}

.futbin-player-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.futbin-player-card-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.futbin-player-rating {
    font-size: 48px;
    font-weight: 900;
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.futbin-player-position {
    font-size: 24px;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.futbin-player-role {
    font-size: 14px;
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.futbin-player-image {
    text-align: center;
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

.futbin-player-image img {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.futbin-player-info {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.futbin-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    padding: 12px 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.futbin-info-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.futbin-info-item span {
    font-size: 14px;
    font-weight: 500;
}

/* Stats Section */
.futbin-player-stats {
    margin-bottom: 30px;
}

.futbin-player-stats h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
}

.futbin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.futbin-stat-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.2s ease;
}

.futbin-stat-item:hover {
    transform: translateY(-5px);
}

.futbin-stat-value {
    font-size: 32px;
    font-weight: 900;
    color: #333;
    margin-bottom: 5px;
}

.futbin-stat-name {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Extra Info Section */
.futbin-extra-info {
    margin-bottom: 30px;
}

.futbin-extra-info h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
}

.futbin-extra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.futbin-extra-item {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.futbin-extra-item .label {
    font-weight: 600;
    color: #666;
}

.futbin-extra-item .value {
    font-weight: 700;
    color: #333;
    font-size: 18px;
}

/* Playstyles Section */
.futbin-playstyles {
    margin-bottom: 30px;
}

.futbin-playstyles h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.futbin-playstyles p {
    color: #666;
    font-size: 16px;
}

/* Prices Section */
.futbin-prices {
    margin-bottom: 30px;
}

.futbin-prices h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
}

.futbin-prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.futbin-price-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.futbin-price-item.estimated {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.futbin-price-item .label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.futbin-price-item .value {
    display: block;
    font-size: 24px;
    font-weight: 900;
}

/* External Link */
.futbin-external-link {
    text-align: center;
    margin-top: 30px;
}

.futbin-external-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2196F3;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.futbin-external-link a:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .futbin-search-container {
        padding: 15px;
    }
    
    .futbin-player-container {
        padding: 20px;
    }
    
    .futbin-player-header h1 {
        font-size: 24px;
    }
    
    .futbin-player-rating {
        font-size: 36px;
        padding: 8px 15px;
    }
    
    .futbin-player-position {
        font-size: 18px;
        padding: 8px 15px;
    }
    
    .futbin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .futbin-stat-value {
        font-size: 24px;
    }
    
    .futbin-result-item {
        padding: 12px 15px;
    }
    
    .futbin-result-player-img {
        width: 50px;
        height: 50px;
    }
    
    .futbin-result-name {
        font-size: 16px;
    }
    
    .futbin-result-meta {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .futbin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .futbin-player-info {
        gap: 10px;
    }
    
    .futbin-info-item {
        padding: 10px 15px;
    }
    
    .futbin-extra-grid,
    .futbin-prices-grid {
        grid-template-columns: 1fr;
    }
}
