/* Battlefield Stats Plugin - Frontend Styles */

/* Container */
.bf-stats-search-form,
.bf-stats-player,
.bf-online-stats,
.bf-server-list {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Such-Formular */
.bf-stats-search-form {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.bf-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bf-form-row {
    margin-bottom: 0;
}

.bf-form-row-full {
    grid-column: 1 / -1;
}

.bf-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bf-form-row select,
.bf-form-row input[type="text"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #ffffff;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.bf-form-row select:focus,
.bf-form-row input[type="text"]:focus {
    outline: none;
    border-color: #2271b1;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 3px rgba(34,113,177,0.1);
}

.bf-form-row select option {
    background: #2d2d2d;
    color: #ffffff;
}

.bf-search-input-wrapper {
    position: relative;
    display: flex;
    gap: 10px;
}

.bf-search-input-wrapper input {
    flex: 1;
}

.bf-submit-button {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(34,113,177,0.3);
}

.bf-submit-button:hover {
    background: linear-gradient(135deg, #135e96 0%, #0a3c5a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34,113,177,0.4);
}

.bf-submit-button svg {
    width: 20px;
    height: 20px;
}

/* Spieler-Statistiken */
.bf-stats-player {
    background: #ffffff;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-top: 25px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bf-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #2271b1;
}

.bf-stats-player-info h3 {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: #1d2327;
    font-weight: 700;
}

.bf-stats-game {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(34,113,177,0.3);
}

/* Rang-Sektion */
.bf-stats-rank-section {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(34,113,177,0.3);
}

.bf-rank-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.bf-rank-info {
    flex: 1;
    color: white;
}

.bf-rank-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.bf-rank-name {
    font-size: 18px;
    opacity: 0.95;
    font-weight: 500;
}

/* Stats Grid */
.bf-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.bf-stat-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #2271b1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.bf-stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-left-width: 6px;
}

.bf-stat-icon {
    font-size: 32px;
    line-height: 1;
}

.bf-stat-content {
    flex: 1;
}

.bf-stat-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.bf-stat-value {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1;
}

.bf-stat-total {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    border-left: 4px solid #0a3c5a;
}

.bf-stat-total .bf-stat-label {
    color: rgba(255,255,255,0.9);
}

.bf-stat-total .bf-stat-value {
    color: white;
}

/* Online Stats */
.bf-online-stats {
    background: #ffffff;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.bf-online-stats h3 {
    font-size: 28px;
    margin-bottom: 25px;
    color: #1d2327;
    font-weight: 700;
}

/* Server Liste */
.bf-server-list {
    background: #ffffff;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.bf-server-list h3 {
    font-size: 28px;
    margin-bottom: 25px;
    color: #1d2327;
    font-weight: 700;
}

.bf-servers {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bf-server-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #2271b1;
    transition: all 0.3s ease;
}

.bf-server-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bf-server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bf-server-header h4 {
    margin: 0;
    font-size: 18px;
    color: #1d2327;
    font-weight: 600;
}

.bf-server-players {
    background: #2271b1;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.bf-server-info {
    display: flex;
    gap: 25px;
    font-size: 14px;
    color: #666;
}

.bf-server-map,
.bf-server-mode {
    font-weight: 500;
}

/* Loading & Error States */
.bf-loading {
    text-align: center;
    padding: 50px 20px;
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.bf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.bf-stats-error {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    color: #c33;
    padding: 25px 30px;
    border-radius: 12px;
    border-left: 4px solid #c33;
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(204,51,51,0.1);
}

.bf-stats-error svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.bf-stats-error p {
    margin: 0 0 5px 0;
    font-weight: 600;
}

.bf-stats-error small {
    display: block;
    opacity: 0.8;
    font-size: 13px;
}

.bf-no-stats {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.bf-search-results {
    margin-top: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bf-form-grid {
        grid-template-columns: 1fr;
    }
    
    .bf-stats-rank-section {
        flex-direction: column;
        text-align: center;
    }
    
    .bf-rank-image {
        width: 100px;
        height: 100px;
    }
    
    .bf-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .bf-stats-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .bf-stat-value {
        font-size: 22px;
    }
    
    .bf-server-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .bf-search-input-wrapper {
        flex-direction: column;
    }
    
    .bf-submit-button {
        width: 100%;
        justify-content: center;
    }
    
    .bf-stats-search-form {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .bf-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .bf-stats-search-form,
    .bf-stats-player,
    .bf-server-list,
    .bf-online-stats {
        padding: 20px;
    }
    
    .bf-stats-player-info h3 {
        font-size: 24px;
    }
    
    .bf-stat-box {
        padding: 15px;
    }
}