:root {
    --bf-orange: #ff6a00;
    --bf-bg: #0b0e11;
    --bf-card-bg: #16191d;
    --bf-border: #2a323a;
}

/* RESET & BASICS */
.bf-ui {
    font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #fff;
    text-transform: uppercase;
    max-width: 900px;
    margin: 20px auto;
}

/* FORM */
.bf-stats-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: var(--bf-bg);
    padding: 20px;
    border: 1px solid var(--bf-orange);
    clip-path: polygon(0 0, 98% 0, 100% 15px, 100% 100%, 2% 100%, 0 calc(100% - 15px));
}

.bf-stats-form select,
.bf-stats-form input {
    background: #001a33;
    border: 1px solid var(--bf-border);
    color: #fff;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    text-transform: uppercase;
    transition: all 0.3s;
}

.bf-stats-form select:focus,
.bf-stats-form input:focus {
    outline: none;
    border-color: var(--bf-orange);
    background: #001a33;
}

.bf-stats-form button {
    background: var(--bf-orange);
    color: #000;
    font-weight: 900;
    border: none;
    padding: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.bf-stats-form button:hover {
    background: #fff;
    box-shadow: 0 0 20px var(--bf-orange);
    transform: translateY(-2px);
}

/* RESULT CARD */
.bf-card {
    background: linear-gradient(135deg, rgba(20,25,30,0.95) 0%, rgba(10,12,15,0.95) 100%);
    border-left: 5px solid var(--bf-orange);
    padding: 30px;
    margin-top: 20px;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.bf-card-inner {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 25px;
}

/* RANK AREA */
.bf-rank-area {
    text-align: center;
    min-width: 100px;
}

.bf-rank-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border: 2px solid var(--bf-border);
    padding: 5px;
    margin: 0 auto;
}

.bf-rank-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--bf-orange));
}

.bf-rank-placeholder {
    font-size: 32px;
    font-weight: 900;
    color: var(--bf-orange);
}

.bf-rank-num {
    font-weight: 900;
    color: var(--bf-orange);
    margin-top: 10px;
    font-size: 12px;
    letter-spacing: 1px;
}

/* PLAYER INFO */
.bf-player-info {
    flex: 1;
}

.bf-player-name {
    font-size: 38px;
    margin: 0 0 15px 0;
    letter-spacing: -1px;
    font-weight: 800;
}

/* PROGRESS BAR */
.bf-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    width: 100%;
    position: relative;
    margin-top: 10px;
    overflow: hidden;
}

.bf-progress-bar div {
    height: 100%;
    background: var(--bf-orange);
    box-shadow: 0 0 15px var(--bf-orange);
    transition: width 0.6s ease;
}

.bf-progress-bar span {
    position: absolute;
    right: 5px;
    top: -18px;
    font-size: 11px;
    color: var(--bf-orange);
}

/* SECTION TITLES */
.bf-section-title {
    font-size: 14px;
    font-weight: 900;
    color: var(--bf-orange);
    letter-spacing: 2px;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bf-border);
}

.bf-section-title:first-of-type {
    margin-top: 20px;
}

/* STATS GRID */
.bf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

.bf-stat-item {
    background: rgba(255,255,255,0.03);
    padding: 12px 15px;
    border: 1px solid var(--bf-border);
    text-align: center;
    transition: all 0.3s;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bf-stat-item:hover {
    background: rgba(255,106,0,0.1);
    border-color: var(--bf-orange);
    transform: translateY(-2px);
}

.bf-stat-item.bf-highlight {
    background: rgba(255,215,0,0.1);
    border-color: #ffd700;
}

.bf-stat-item.bf-highlight:hover {
    background: rgba(255,215,0,0.15);
}

.bf-stat-item.bf-highlight span {
    color: #ffd700;
}

.bf-stat-item span {
    display: block;
    font-size: 10px;
    color: #88929b;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.bf-stat-item strong {
    font-size: 20px;
    color: #fff;
    font-weight: 700;
}

/* ONLINE COUNTER */
.bf-online-count {
    background: rgba(0,255,100,0.1);
    color: #00ff6a;
    padding: 8px 15px;
    border: 1px solid #00ff6a;
    display: inline-block;
    margin-bottom: 15px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* LOADING & ERROR */
.bf-loading {
    padding: 30px;
    text-align: center;
    color: var(--bf-orange);
    font-size: 18px;
    font-weight: 700;
    background: var(--bf-card-bg);
    border-left: 4px solid var(--bf-orange);
}

.bf-error {
    padding: 20px;
    background: rgba(255, 0, 0, 0.1);
    color: #ff5555;
    border-left: 4px solid #ff0000;
    font-weight: 600;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .bf-stats-form {
        grid-template-columns: 1fr;
    }
    
    .bf-card-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .bf-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bf-player-name {
        font-size: 24px;
    }

    .bf-section-title {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .bf-grid {
        grid-template-columns: 1fr;
    }
}