/* Blox Fruits Calculator - Complete Edition Styles */

/* CSS Variables for Gaming Theme */
:root {
    --bfc-primary: #8b5cf6;
    --bfc-secondary: #06b6d4;
    --bfc-background: #0a0a0a;
    --bfc-card: #1a1a1a;
    --bfc-border: #2a2a2a;
    --bfc-text: #ffffff;
    --bfc-text-muted: #888888;
    --bfc-success: #10b981;
    --bfc-warning: #f59e0b;
    --bfc-error: #ef4444;
    --bfc-mythical: linear-gradient(135deg, #8b5cf6, #ec4899);
    --bfc-legendary: linear-gradient(135deg, #f97316, #ef4444);
    --bfc-rare: linear-gradient(135deg, #3b82f6, #06b6d4);
    --bfc-uncommon: linear-gradient(135deg, #10b981, #059669);
    --bfc-common: linear-gradient(135deg, #6b7280, #4b5563);
}

/* Reset and Base Styles */
#bfc-calculator-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bfc-background);
    color: var(--bfc-text);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1.6;
}

#bfc-calculator-wrapper *,
#bfc-calculator-wrapper *::before,
#bfc-calculator-wrapper *::after {
    box-sizing: border-box;
}

/* Header Styles */
.bfc-header {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bfc-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 40;
}

.bfc-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bfc-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bfc-logo {
    width: 40px;
    height: 40px;
    background: var(--bfc-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bfc-title {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--bfc-primary), var(--bfc-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.bfc-subtitle {
    font-size: 0.875rem;
    color: var(--bfc-text-muted);
    margin: 0;
}

.bfc-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Button Styles */
.bfc-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.bfc-btn-primary {
    background: var(--bfc-primary);
    color: white;
}

.bfc-btn-primary:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.bfc-btn-secondary {
    background: rgba(139, 92, 246, 0.1);
    color: var(--bfc-primary);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.bfc-btn-secondary:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-1px);
}

.bfc-btn-ghost {
    background: transparent;
    color: var(--bfc-primary);
}

.bfc-btn-ghost:hover {
    background: rgba(139, 92, 246, 0.1);
}

.bfc-btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Search Section */
.bfc-search-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.bfc-search-wrapper {
    max-width: 400px;
    margin: 0 auto;
}

.bfc-search-input-container {
    position: relative;
}

.bfc-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: var(--bfc-card);
    border: 1px solid var(--bfc-border);
    border-radius: 8px;
    color: var(--bfc-text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.bfc-search-input:focus {
    outline: none;
    border-color: var(--bfc-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.bfc-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--bfc-text-muted);
}

/* Trade Comparison */
.bfc-trade-comparison {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .bfc-trade-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.bfc-trade-section {
    background: var(--bfc-card);
    border: 1px solid var(--bfc-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.bfc-trade-section:hover {
    border-color: var(--bfc-primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.bfc-trade-section.you {
    border-left: 3px solid var(--bfc-primary);
}

.bfc-trade-section.them {
    border-left: 3px solid var(--bfc-secondary);
}

.bfc-trade-header {
    margin-bottom: 1rem;
}

.bfc-trade-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bfc-trade-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.bfc-trade-section.you .bfc-trade-icon {
    background: rgba(139, 92, 246, 0.1);
}

.bfc-trade-section.them .bfc-trade-icon {
    background: rgba(6, 182, 212, 0.1);
}

.bfc-trade-info h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.bfc-trade-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--bfc-text-muted);
}

/* Value Display */
.bfc-value-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.bfc-value-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid var(--bfc-border);
}

.bfc-value-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bfc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.bfc-value-amount {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--bfc-success);
}

.bfc-demand-amount {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bfc-warning);
}

/* Item Slots */
.bfc-item-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.bfc-item-slot {
    aspect-ratio: 1;
    border: 2px dashed var(--bfc-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bfc-item-slot.empty {
    background: rgba(255, 255, 255, 0.02);
}

.bfc-item-slot.empty:hover {
    border-color: var(--bfc-primary);
    background: rgba(139, 92, 246, 0.05);
}

.bfc-item-slot.filled {
    border: 2px solid var(--bfc-primary);
    background: rgba(139, 92, 246, 0.1);
}

.bfc-add-icon {
    font-size: 1.5rem;
    color: var(--bfc-text-muted);
}

.bfc-item-slot.empty:hover .bfc-add-icon {
    color: var(--bfc-primary);
}

.bfc-fruit-in-slot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.bfc-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bfc-error);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bfc-item-slot.filled:hover .bfc-remove-btn {
    opacity: 1;
}

/* Competitor Link */
.bfc-text-center {
    text-align: center;
}

.bfc-competitor-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--bfc-primary);
}

.bfc-competitor-link:hover {
    transform: scale(1.05);
}

.bfc-gradient-text {
    background: linear-gradient(135deg, var(--bfc-primary), var(--bfc-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bfc-arrow {
    transition: transform 0.3s ease;
}

.bfc-competitor-link:hover .bfc-arrow {
    transform: translateX(4px) scale(1.1);
}

/* Trade Analysis */
.bfc-analysis {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    background: var(--bfc-card);
    border: 1px solid var(--bfc-border);
    border-radius: 12px;
    padding: 2rem;
}

.bfc-analysis-result {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
}

.bfc-analysis-result.fair {
    background: rgba(16, 185, 129, 0.1);
    color: var(--bfc-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.bfc-analysis-result.win {
    background: rgba(16, 185, 129, 0.1);
    color: var(--bfc-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.bfc-analysis-result.loss {
    background: rgba(239, 68, 68, 0.1);
    color: var(--bfc-error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.bfc-analysis-summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .bfc-analysis-summary {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .bfc-vs {
        order: -1;
    }
}

.bfc-analysis-offer {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid var(--bfc-border);
}

.bfc-analysis-offer.your {
    border-left: 3px solid var(--bfc-primary);
}

.bfc-analysis-offer.their {
    border-left: 3px solid var(--bfc-secondary);
}

.bfc-analysis-offer h4 {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bfc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bfc-analysis-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--bfc-success);
    margin-bottom: 0.5rem;
}

.bfc-analysis-demand {
    font-size: 0.875rem;
    color: var(--bfc-text-muted);
}

.bfc-vs {
    font-size: 1.25rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--bfc-primary), var(--bfc-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.bfc-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .bfc-actions {
        flex-direction: column;
    }
}

/* Popular Trades */
.bfc-popular-trades {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.bfc-popular-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.bfc-popular-title {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--bfc-primary), var(--bfc-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.bfc-trending-icon {
    font-size: 1.25rem;
}

.bfc-popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.bfc-popular-card {
    background: var(--bfc-card);
    border: 1px solid var(--bfc-border);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bfc-popular-card:hover {
    border-color: var(--bfc-primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.bfc-popular-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.bfc-popular-badge {
    background: linear-gradient(135deg, var(--bfc-primary), var(--bfc-secondary));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.bfc-popular-time {
    font-size: 0.75rem;
    color: var(--bfc-text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.bfc-popular-content {
    margin-bottom: 1rem;
}

.bfc-popular-player {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(6, 182, 212, 0.05));
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bfc-popular-player:last-of-type {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(139, 92, 246, 0.05));
    border-color: rgba(6, 182, 212, 0.2);
}

.bfc-popular-fruit {
    position: relative;
}

.bfc-popular-fruit-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.bfc-popular-pulse {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--bfc-success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.bfc-popular-info {
    flex: 1;
}

.bfc-popular-name {
    display: block;
    font-weight: 600;
    color: var(--bfc-primary);
    font-size: 0.875rem;
}

.bfc-popular-value {
    display: block;
    font-size: 0.75rem;
    color: var(--bfc-text-muted);
}

.bfc-popular-vs {
    text-align: center;
    font-weight: bold;
    background: linear-gradient(135deg, var(--bfc-primary), var(--bfc-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0;
}

.bfc-popular-status {
    text-align: center;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.bfc-popular-status.fair {
    background: rgba(16, 185, 129, 0.1);
    color: var(--bfc-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.bfc-popular-status.win {
    background: rgba(16, 185, 129, 0.1);
    color: var(--bfc-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.bfc-popular-status.loss {
    background: rgba(239, 68, 68, 0.1);
    color: var(--bfc-error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Modal Styles */
.bfc-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.bfc-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.bfc-modal-content {
    background: var(--bfc-card);
    border: 1px solid var(--bfc-border);
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bfc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--bfc-border);
}

.bfc-modal-title {
    font-size: 1.25rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--bfc-primary), var(--bfc-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.bfc-modal-close {
    font-size: 1.5rem;
    color: var(--bfc-text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.bfc-modal-close:hover {
    color: var(--bfc-text);
}

.bfc-modal-description {
    padding: 0 1.5rem;
    color: var(--bfc-text-muted);
    font-size: 0.875rem;
}

.bfc-modal-search {
    padding: 1rem 1.5rem;
}

/* Rarity Tabs */
.bfc-rarity-tabs {
    display: flex;
    padding: 0 1.5rem;
    gap: 0.5rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--bfc-border);
}

.bfc-rarity-tab {
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--bfc-text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.bfc-rarity-tab:hover,
.bfc-rarity-tab.active {
    color: var(--bfc-primary);
    border-bottom-color: var(--bfc-primary);
}

/* Fruits Grid */
.bfc-fruits-grid {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.bfc-fruit-card {
    background: var(--bfc-card);
    border: 1px solid var(--bfc-border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bfc-fruit-card:hover {
    border-color: var(--bfc-primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.bfc-fruit-image {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    margin: 0 auto 0.75rem;
    display: block;
}

.bfc-fruit-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

/* Rarity Badges */
.bfc-rarity-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.bfc-rarity-mythical {
    background: var(--bfc-mythical);
    color: white;
}

.bfc-rarity-legendary {
    background: var(--bfc-legendary);
    color: white;
}

.bfc-rarity-rare {
    background: var(--bfc-rare);
    color: white;
}

.bfc-rarity-uncommon {
    background: var(--bfc-uncommon);
    color: white;
}

.bfc-rarity-common {
    background: var(--bfc-common);
    color: white;
}

.bfc-fruit-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bfc-success);
    margin-bottom: 0.25rem;
}

.bfc-fruit-demand {
    font-size: 0.75rem;
    color: var(--bfc-text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .bfc-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .bfc-header-actions {
        justify-content: center;
    }
    
    .bfc-search-section {
        margin: 1rem auto;
    }
    
    .bfc-trade-comparison {
        margin: 1rem auto;
    }
    
    .bfc-analysis {
        margin: 1rem auto;
        padding: 1rem;
    }
    
    .bfc-popular-trades {
        margin: 2rem auto;
    }
    
    .bfc-popular-grid {
        grid-template-columns: 1fr;
    }
    
    .bfc-fruits-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .bfc-item-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bfc-fruits-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Animations */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
    }
}

.bfc-glow-effect {
    animation: glow 2s ease-in-out infinite;
}

/* Utility Classes */
.bfc-hidden {
    display: none !important;
}

.bfc-text-center {
    text-align: center;
}

.bfc-mt-1 { margin-top: 0.25rem; }
.bfc-mt-2 { margin-top: 0.5rem; }
.bfc-mt-3 { margin-top: 0.75rem; }
.bfc-mt-4 { margin-top: 1rem; }

.bfc-mb-1 { margin-bottom: 0.25rem; }
.bfc-mb-2 { margin-bottom: 0.5rem; }
.bfc-mb-3 { margin-bottom: 0.75rem; }
.bfc-mb-4 { margin-bottom: 1rem; }

.bfc-p-1 { padding: 0.25rem; }
.bfc-p-2 { padding: 0.5rem; }
.bfc-p-3 { padding: 0.75rem; }
.bfc-p-4 { padding: 1rem; }